Re: set-valued function called in context that cannot accept a set

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: set-valued function called in context that cannot accept a set
Дата
Msg-id 49B18742.5030408@iol.ie
обсуждение исходный текст
Ответ на set-valued function called in context that cannot accept a set  ("Eric B. Ridge" <ebr@tcdi.com>)
Ответы Re: set-valued function called in context that cannot accept a set  ("Eric B. Ridge" <ebr@tcdi.com>)
Список pgsql-general
On 06/03/2009 19:53, Eric B. Ridge wrote:
> # select unnest2(ARRAY[1,2,3]), 'hi';
> ERROR:  set-valued function called in context that cannot accept a set
> CONTEXT:  PL/pgSQL function "unnest2" line 8 at return next

When a function returns SETOF something, you need to treat it as if it
were a table, thus:

   select * from unnest2(...);

HTH,

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

Предыдущее
От: "Eric B. Ridge"
Дата:
Сообщение: set-valued function called in context that cannot accept a set
Следующее
От: "Eric B. Ridge"
Дата:
Сообщение: Re: set-valued function called in context that cannot accept a set