Re: Review: UNNEST (and other functions) WITH ORDINALITY

From: Greg Stark <stark(at)mit(dot)edu>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date: 2013-07-31 15:41:16
Message-ID: CAM-w4HMuguQn1KfzP4bvuwNOAzSMH0eokb7oHiALLUaWp90xNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 29, 2013 at 8:45 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> Because this patch is still being discussed and tinkered with, I have
> moved it to 9.4CF2.

Fwiw I already committed it. In the end I made only trivial changes
the most significant of which was changing the column name to
"ordinality". I found the changes I was making didn't really make much
difference and were turning into bike shedding.

There are two followup changes that were discussed in this thread:

1) Changing the WITH_* and NULLS_* tokens to not eat the following
token if it's not used by the grammar so that it doesn't interfere
with syntax like "select nulls first from t as a(nulls)".

2) Teaching the parser that the functionscan is ordered by ordinality
so it can do a merge join without resorting the inputs. That would
relieve the one remaining piece of functionality that multiple SRFs in
the target list give over SRFs in the from list.

I have patches for both of these in progress but frankly they're both
stuck and I'm not likely to finish either without some advice. I'll
start new threads (or already have) for them though.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-07-31 15:50:53 WITH ORDINALITY planner improvements
Previous Message Bruce Momjian 2013-07-31 15:37:27 Re: (trivial patch) remove superfluous semicolons from pg_dump