Re: Howto return values from a function

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Howto return values from a function
Дата
Msg-id 482D4399.3090501@archonet.com
обсуждение исходный текст
Ответ на Re: Howto return values from a function  ("A B" <gentosaker@gmail.com>)
Ответы Re: Howto return values from a function
Список pgsql-general
A B wrote:
>> How you generate the results is up to you. when you have them you
>> either use RETURN NEXT or RETURN QUERY to return them to the caller.
>
> Now I get the reply
>
> ERROR:  set-valued function called in context that cannot accept a set
> CONTEXT:  PL/pgSQL function "actionlist" line 11 at return next

It's a source of rows, so you need to treat it like a table or a view:

SELECT * FROM actionlist(...);


--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Howto return values from a function
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: psql proxy