Re: WIP patch for LATERAL subqueries - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: WIP patch for LATERAL subqueries
Date
Msg-id CAHyXU0zdraBd+yzHzUxN_15D2QHZVBs651SdooyEjhYg-A1P2Q@mail.gmail.com
Whole thread Raw
In response to Re: WIP patch for LATERAL subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP patch for LATERAL subqueries
List pgsql-hackers
On Tue, Aug 7, 2012 at 6:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
>> What I'd like to do next, barring objections, is to band-aid the places
>> where the planner could crash on a LATERAL query (probably just make it
>> throw FEATURE_NOT_SUPPORTED errors), write some documentation, and
>> then commit what I've got.  After that I can go back to improve the
>> planner and work on the parser refactoring issues as separate patches.
>
> ... and done (though the pgsql-committers message seems to have got hung
> up for moderation).  I put some simplistic examples into section 7.2.1.5
> and the SELECT reference page ... if anybody has ideas for
> more-compelling small examples, please speak up.

This is just awesome.  Anyways, I was looking around the docs for
references to the old methodology of select list SRF function calls.
This paragraph:
http://www.postgresql.org/docs/devel/static/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-SET

could probably use some enhancement describing best practices in a
LATERAL world and more examples of dealing with set returning
functions in general.  I also noticed that the build in SRF page
(http://www.postgresql.org/docs/devel/static/functions-srf.html) lies
with the comment "This section describes functions that possibly
return more than one row. Currently the only functions in this class
are series generating functions" since at minimum we have 'unnest' so
that page could use some wordsmithing as well.

merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible bug in PostgreSQL 9.2 stable: TwoPhaseGetDummyBackendId()
Next
From: Bruce Momjian
Date:
Subject: Re: WIP fix proposal for bug #6123