Re: ERROR: query has no destination for result data

Поиск
Список
Период
Сортировка
От Peter Kroon
Тема Re: ERROR: query has no destination for result data
Дата
Msg-id CAOh+DO=kwWi9cPk678G8a__oC-N+7wdXp0smNuYFvCYs-XVANg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ERROR: query has no destination for result data  (Craig Ringer <craig@2ndQuadrant.com>)
Список pgsql-general
When using plain SQL I get this message:
ERROR:  language "sql" does not support inline code execution
When removing the BEGIN+END block statements the message persists.


2012/11/23 Craig Ringer <craig@2ndquadrant.com>
On 11/23/2012 06:53 PM, Peter Kroon wrote:
When using:
RETURN QUERY(
SELECT 'this is text'
);

I get another error: 
ERROR:  cannot use RETURN QUERY in a non-SETOF function

Use a plain SQL function instead of PL/PgSQL, or use `SELECT INTO` and ordinary `RETURN`.


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ERROR: query has no destination for result data
Следующее
От: Euler Taveira
Дата:
Сообщение: Re: [BUGS] Prepared Statement Name Truncation