Andrew Gierth <and...@tao11.riddles.org.uk> writes: > "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes: > Tom> and this would result in producing the array elements as a table > Tom> column. There is nothing in there about a function returning > Tom> set.
> In the spec, there is no such thing as a function returning a set of > rows in the sense that we use. Right, but they do have a concept of arrays that's similar to ours, and AFAICS the spec demands different behavior for an array-returning function than what we've got here. 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. 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