Re: request for advise

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: request for advise
Дата
Msg-id 23109.1004983699@sss.pgh.pa.us
обсуждение исходный текст
Ответ на request for advise  ("Brian Hirt" <bhirt@mobygames.com>)
Список pgsql-general
"Brian Hirt" <bhirt@mobygames.com> writes:
> I tried writing a function to
> recursively delete the list but it fails with "ERROR: unexpected SELECT
> query in exec_stmt_execsql()"

If you want to evaluate a SQL query and discard the results, plpgsql
wants you to say "PERFORM foo", not "SELECT foo".

Enough people have been confused by this that I think we ought to do
something: either allow SELECT with no destination, or at least reword
the error message to mention PERFORM.

Comments?

            regards, tom lane

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

Предыдущее
От: "Eric Day"
Дата:
Сообщение: Re: Stored procedures
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: postgres copy command