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

From Andres Freund
Subject Re: Review: UNNEST (and other functions) WITH ORDINALITY
Date
Msg-id 20130724180115.GE10713@alap2.anarazel.de
Whole thread Raw
In response to Re: Review: UNNEST (and other functions) WITH ORDINALITY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Review: UNNEST (and other functions) WITH ORDINALITY
List pgsql-hackers
On 2013-07-24 13:36:39 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Tue, Jul 23, 2013 at 9:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> If it weren't that we've been speculating for years about deprecating
> >> SRFs-in-tlists once we had LATERAL, I would personally consider this
> >> patch DOA in this form.
> 
> > I guess I'd sort of assumed that the plan was to continue accepting
> > SRFs in tlists but rewrite them as lateral joins, rather than getting
> > rid of them altogether.
> 
> That seems to me to be unlikely to happen, because it would be
> impossible to preserve the current (admittedly bad) semantics.
> If we're going to change the behavior at all we might as well just
> drop the feature, IMO.

I think removing the feature will be a rather painful procedure for
users and thus will need a rather long deprecation period. The amount of
code using SRFs in targetlists is quite huge if my experience is
anything to go by.
And much of that can trivially/centrally be rewritten to LATERAL, not
to speak of the cross-version compatibility problem.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Review: UNNEST (and other functions) WITH ORDINALITY
Next
From: Andres Freund
Date:
Subject: Re: [GENERAL] Insert result does not match record count