Re: WIP patch for LATERAL subqueries

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP patch for LATERAL subqueries
Date: 2012-08-08 15:30:54
Message-ID: CAHyXU0zdraBd+yzHzUxN_15D2QHZVBs651SdooyEjhYg-A1P2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 7, 2012 at 6:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-08-08 17:27:58 Re: WIP fix proposal for bug #6123
Previous Message Tom Lane 2012-08-08 15:08:39 Re: Possible bug in PostgreSQL 9.2 stable: TwoPhaseGetDummyBackendId()