On Mar 6, 2009, at 3:27 PM, Raymond O'Donnell wrote:
When a function returns SETOF something, you need to treat it as if it
were a table, thus:
select * from unnest2(...);
Except that isn't true if the function is written in C.
CREATE OR REPLACE FUNCTION unnest(anyarray)
RETURNS SETOF anyelement AS 'unnest'
LANGUAGE 'C' IMMUTABLE;
SELECT unnest(...);
works just fine using the above defined C function.
So my question is really, what's the difference and why doesn't this
work with PL/PGSQL functions?
eric
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general