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(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------