Re: Review: UNNEST (and other functions) WITH ORDINALITY - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date
Msg-id CAM-w4HMuguQn1KfzP4bvuwNOAzSMH0eokb7oHiALLUaWp90xNQ@mail.gmail.com
Whole thread Raw
In response to Re: Review: UNNEST (and other functions) WITH ORDINALITY  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Review: UNNEST (and other functions) WITH ORDINALITY
List pgsql-hackers
On Mon, Jul 29, 2013 at 8:45 PM, Josh Berkus <josh@agliodbs.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



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
Next
From: Bruce Momjian
Date:
Subject: Re: (trivial patch) remove superfluous semicolons from pg_dump