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

From Andrew Gierth
Subject Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date
Msg-id e00f67da5151752359d805038fcc35db@news-out.riddles.org.uk
Whole thread Raw
In response to Review: UNNEST (and other functions) WITH ORDINALITY  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
Stephen Frost said:
> [stuff about foreign tables]

I think the issue with foreign tables is probably moot because if you
_did_ want to have some types of foreign tables with a fixed
ordinality, you'd probably also want qual pushdown to work for it
(i.e. so that WHERE rownum=123 doesn't have to filter all the rows),
whereas with SRFs this doesn't really apply.

For this to work, foreign tables with a fixed ordering would have to
provide that in the FDW - which is in any case the only place that
knows whether a fixed order would even make any sense.

So I see no overlap here with the SRF ordinality case.

As for VALUES, the spec regards those as constructing a table and
therefore not having any inherent order - the user can add their own
ordinal column if need be. Even if you did want to add WITH ORDINALITY
for VALUES, though, it would actually make more sense to do it in the
Values Scan node since that maintains its own ordinal position already.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Next
From: Quan Zongliang
Date:
Subject: Re: improve Chinese locale performance