Juan Daniel Santana Rodés wrote > Hi... > I am programming a procedure in plpgsql language and it must return a > boolean response. > The procedure must return TRUE if the query is semantically correct and if > not correct, return FALSE. > This must be done without running the query. > Greetings to all, thanks in advance. You can confirm syntax (in theory, using explain) but not semantics. The later basically means that the query does what it's author intended. Any two queries with desired identical semantics must give the same output given identical input - though the syntax of the two queries can differ. You probably meant syntactically but since both terms have meaning in this context picking the wrong word is confusing to others. I'm not sure how safe doing so would be...or where limitations may exist - i.e., some queries may not be able to be evaluated in this way. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-know-if-a-query-is-semantically-correct-without-execute-it-tp5771547p5771556.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general