Re: Well-formed SQL check in postgres?

Поиск
Список
Период
Сортировка
От Davor J.
Тема Re: Well-formed SQL check in postgres?
Дата
Msg-id i16khd$2g8f$1@news.hub.org
обсуждение исходный текст
Список pgsql-sql
Two rrror codes are interesting for this:
42000 SYNTAX ERROR OR ACCESS RULE VIOLATION

42601 SYNTAX ERROR


"Davor J." <DavorJ@live.com> wrote in message 
news:hu8ang$1isi$1@news.hub.org...
> Has anyone a suggestion on how to check whether a SQL SELECT query in 
> postgres is well-formed (like wff). The query should not be executed (!), 
> only checked for well-formedness.
>
> What I was thinking off is appending EXPLAIN to the query. EXPLAIN doesn't 
> execute it, but just runs it through the planner. Then I can read whether 
> there was any error or not.
>
> Is there a better way or is this the way to go?
>
> Thanks,
> Davor
> 




В списке pgsql-sql по дате отправления:

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Cant execute the query
Следующее
От: Andreas
Дата:
Сообщение: How would I store little key-Nr to text lists?