Search Postgresql Archives

Re: validate synatax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perhaps creating a temporary table would be more efficient.
Then the rollback isn't necessary.   


2013/12/11 Jov <zhao6014@xxxxxxxxx>

you can use the transition.
eg:
begin;
creat table(...);
catch error if the statement not validated.
rollback;

jov

在 2013-12-11 上午5:43,"Peter Kroon" <plakroon@xxxxxxxxx>写道:

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux