Re: How to know if a query is semantically correct without execute it?

Поиск
Список
Период
Сортировка
От CR Lender
Тема Re: How to know if a query is semantically correct without execute it?
Дата
Msg-id 523A5143.6010105@gmail.com
обсуждение исходный текст
Ответ на How to know if a query is semantically correct without execute it?  (Juan Daniel Santana Rodes <jdsantana@estudiantes.uci.cu>)
Список pgsql-general
On 2013-09-19 02:01, Juan Daniel Santana Rodes wrote:
> I am programming a procedure in plpgsql language and it must return a
> boolean response. The procedure must return TRUE if the query is
> semantically correct and if not correct, return FALSE. This must be
> done without running the query.

You could use EXPLAIN instead of running the actual query, catching the
eventual errors and returning TRUE or FALSE depending on the outcome.
I'm not sure what you mean by "semantically correct", but in addition to
simple syntax errors, non-existent relations, columns, functions, etc,
would also be caught.

regards,
CRL


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

Предыдущее
От: Juan Daniel Santana Rodes
Дата:
Сообщение: How to know if a query is semantically correct without execute it?
Следующее
От: Jayadevan
Дата:
Сообщение: Re: Query - CPU issue