From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Johnston <polobo(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: UNNEST with multiple args, and TABLE with multiple funcs |
Date: | 2013-11-21 02:42:48 |
Message-ID: | 28893.1385001768@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Johnston <polobo(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2013-11-21 02:51:14 | Re: UNNEST with multiple args, and TABLE with multiple funcs |
Previous Message | David Johnston | 2013-11-21 02:36:47 | Re: UNNEST with multiple args, and TABLE with multiple funcs |