David Johnston <pol...@yahoo.com> writes:
> Tom Lane-2 wrote
>> We could conceivably say that we'll implicitly UNNEST() if the function
>> returns array, and not otherwise --- but that seems pretty inconsistent
>> and surprise-making to me.  I'm not too sure what to do if a function
>> returns setof array, either.

> If a function returns a scalar array (RETURNS text[]) we would unnest the
> array per-spec.  If it returns a set (RETURN setof anything {including a
> single array}) we would not unnest it since set returning functions are
> non-spec - instead we'd use our SRF processing routine.  If the function
> returns a scalar non-array the implicit single-row returned by the function
> would be output.

I find that way too inconsistent to be a sane specification.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to