Re: ROWS FROM(): A Foolish (In)Consistency? - Mailing list pgsql-hackers

From David Fetter
Subject Re: ROWS FROM(): A Foolish (In)Consistency?
Date
Msg-id 20151020152331.GB28068@fetter.org
Whole thread Raw
In response to Re: ROWS FROM(): A Foolish (In)Consistency?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Oct 20, 2015 at 11:16:13AM -0400, Robert Haas wrote:
> On Tue, Oct 20, 2015 at 11:03 AM, David Fetter <david@fetter.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.Nasby@bluetreble.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.

Sorry that didn't start out clearer.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Multi-column distinctness.
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH] SQL function to report log message