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
[email protected]
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

-- 
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to