Two rrror codes are interesting for this:
42000 SYNTAX ERROR OR ACCESS RULE VIOLATION

42601 SYNTAX ERROR


"Davor J." <dav...@live.com> wrote in message 
news:hu8ang$1is...@news.hub.org...
> Has anyone a suggestion on how to check whether a SQL SELECT query in 
> postgres is well-formed (like wff). The query should not be executed (!), 
> only checked for well-formedness.
>
> What I was thinking off is appending EXPLAIN to the query. EXPLAIN doesn't 
> execute it, but just runs it through the planner. Then I can read whether 
> there was any error or not.
>
> Is there a better way or is this the way to go?
>
> Thanks,
> Davor
> 



-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to