From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ROWS FROM(): A Foolish (In)Consistency? |
Date: | 2015-10-20 15:16:13 |
Message-ID: | CA+TgmoZYefj-E105PKEYRM2yEV-6ue4ydi3T-bZ_gmerMwMmWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 20, 2015 at 11:03 AM, David Fetter <david(at)fetter(dot)org> wrote:
> On Tue, Oct 20, 2015 at 10:52:05AM -0400, Robert Haas wrote:
>> On Mon, Oct 19, 2015 at 8:02 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>> > On 10/19/15 1:07 PM, David Fetter wrote:
>> >>
>> >> What I'd like to do is lift the restriction on ROWS FROM(), which
>> >> currently requires that the stuff inside the parentheses set-returning
>> >> functions, so constructs something like the following would actually work:
>> >>
>> >> SELECT *
>> >> FROM
>> >> ROWS FROM (
>> >> (VALUES (...), ..., (...)),
>> >> (SELECT ... ),
>> >> (INSERT ... RETURNING ... ),
>> >> my_srf()
>> >> )
>> >> AS t(...)
>> >>
>> >> would actually work.
>> >
>> >
>> > There's been a few places where I would have found that handy.
>>
>> Why not just use a subquery with UNION ALL?
>
> Because UNION ALL glues the queries vertically, not horizontally.
Ah. I get it now. Thanks for clarifying.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-10-20 15:22:34 | Re: Multi-column distinctness. |
Previous Message | Robert Haas | 2015-10-20 15:15:22 | Re: [PATCH] SQL function to report log message |