Re: validate synatax

From: Jov <zhao6014(at)gmail(dot)com>
To: Peter Kroon <plakroon(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: validate synatax
Date: 2013-12-11 13:32:46
Message-ID: CADyrUxMmBv8wvuwLAfiHNivdbCgXkoWH1ik1+mP5emkq2TnXYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)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.
>
>
> http://wiki.postgresql.org/wiki/Introduction_to_VACUUM,_ANALYZE,_EXPLAIN,_and_COUNT#PostgreSQL_EXPLAIN
>
> Any suggestions are welcome.
>
> Best,
> Peter
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message salah jubeh 2013-12-11 13:36:53 Re: Convert table to view 9.1
Previous Message Michael Paquier 2013-12-11 13:23:31 Re: validate synatax