Re: validate synatax - Mailing list pgsql-general

From Peter Kroon
Subject Re: validate synatax
Date
Msg-id CAOh+DOmFp358F-=w62JTRhe-+ms9ie_F6_HFD8akoEM=f89gDg@mail.gmail.com
Whole thread Raw
In response to Re: validate synatax  (Jov <zhao6014@gmail.com>)
Responses Re: validate synatax  (Szymon Guz <mabewlun@gmail.com>)
List pgsql-general
Perhaps creating a temporary table would be more efficient.
Then the rollback isn't necessary.   


2013/12/11 Jov <zhao6014@gmail.com>

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@gmail.com>写道:

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

pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Convert table to view 9.1
Next
From: Szymon Guz
Date:
Subject: Re: validate synatax