pgsql: Another round of planner fixes for LATERAL. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Another round of planner fixes for LATERAL.
Date
Msg-id E1T2nU2-0002JL-TN@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Copy-editing for recent window-functions documentation rewrite.
Next
From: Tom Lane
Date:
Subject: pgsql: Make use of LATERAL in information_schema.sequences view.