From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, David Johnston <polobo(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: UNNEST with multiple args, and TABLE with multiple funcs |
Date: | 2013-12-03 18:57:16 |
Message-ID: | 20131203185716.GG1163520@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 03, 2013 at 10:03:32AM -0500, Stephen Frost wrote:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> > After sleeping on it, your other suggestion of TABLE OF, or possibly
> > TABLE FROM, is starting to grow on me.
> >
> > Who else has an opinion?
>
> Alright, for my 2c, I like having this syntax include 'TABLE' simply
> because it's what folks coming from Oracle might be looking for.
> Following from that, to keep it distinct from the spec's notion of
> 'TABLE', my preference is 'TABLE FROM'. I don't particularly like
> 'TABLE OF', nor do I like the various 'ROWS' suggestions.
I like having "ROWS" in there somehow, because it denotes the distinction from
SQL-standard TABLE(). Suppose we were to implement the SQL-standard TABLE(),
essentially just mapping it to UNNEST(). Then we'd have "TABLE (f())" that
unpacks the single array returned by f(), and we'd have "TABLE FROM (f())"
that unpacks the set of rows returned by f(). The word "FROM" alone does not
indicate that difference the way including "ROWS" does. (I don't object to
having "FROM" in addition to "ROWS".)
--
Noah Misch
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2013-12-03 18:59:38 | Re: Why we are going to have to go DirectIO |
Previous Message | Andres Freund | 2013-12-03 18:55:54 | Re: pgsql: Fix a couple of bugs in MultiXactId freezing |