Re: validate synatax - Mailing list pgsql-general

From Szymon Guz
Subject Re: validate synatax
Date
Msg-id CAFjNrYsxvcVDJRGVb2RWCvkSCFg17pssAsnH=qw6QLj_vmK6Og@mail.gmail.com
Whole thread Raw
In response to validate synatax  (Peter Kroon <plakroon@gmail.com>)
Responses Re: validate synatax
List pgsql-general



On 10 December 2013 22:40, Peter Kroon <plakroon@gmail.com> wrote:
Hi,

How can I validate any query on PostgreSQL without executing the sql.
I was able with EXPLAIN to find some errors. However this only worked with a SELECT statement. When i tried to create a TABLE it would not run.
I do not wish to install external packages. Preferably use only default present features.


Any suggestions are welcome.

Best,
Peter

Why do you want to do that? Maybe just test it, there can be many more problems then just not executing query, the query logic could be bad, even if the syntax is correct. You can always run it inside transaction and rollback at the end.

regards,
Szymon

pgsql-general by date:

Previous
From: Peter Kroon
Date:
Subject: validate synatax
Next
From: Peter Kroon
Date:
Subject: Re: validate synatax