pgsql: Another round of planner fixes for LATERAL.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Another round of planner fixes for LATERAL.
Date: 2012-08-18 18:10:50
Message-ID: E1T2nU2-0002JL-TN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Another round of planner fixes for LATERAL.

Formerly, subquery pullup had no need to examine other entries in the range
table, since they could not contain any references to the subquery being
pulled up. That's no longer true with LATERAL, so now we need to be able
to visit rangetable subexpressions to replace Vars referencing the
pulled-up subquery. Also, this means that extract_lateral_references must
be unsurprised at encountering lateral PlaceHolderVars, since such might be
created when pulling up a subquery that's underneath an outer join with
respect to the lateral reference.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/084a29c94f94b5a08aec9f68f3cfaf252f4fa17c

Modified Files
--------------
src/backend/optimizer/plan/initsplan.c | 22 ++++++-
src/backend/optimizer/prep/prepjointree.c | 66 ++++++++++++++++++++-
src/backend/optimizer/util/var.c | 17 ++++--
src/test/regress/expected/join.out | 94 +++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 16 +++++
5 files changed, 205 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-08-18 20:15:08 pgsql: Make use of LATERAL in information_schema.sequences view.
Previous Message Gavin Flower 2012-08-18 08:37:16 Re: Re: [COMMITTERS] pgsql: In docs, change a few cases of "not important" to "unimportant".