Re: UNNEST with multiple args, and TABLE with multiple funcs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: UNNEST with multiple args, and TABLE with multiple funcs
Date
Msg-id 28537.1385000851@sss.pgh.pa.us
Whole thread Raw
In response to Re: UNNEST with multiple args, and TABLE with multiple funcs  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: UNNEST with multiple args, and TABLE with multiple funcs
Re: UNNEST with multiple args, and TABLE with multiple funcs
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tom" == Tom Lane <tgl@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



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: UNNEST with multiple args, and TABLE with multiple funcs
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: [PATCH] Store Extension Options