pgsql: Fix another join removal bug: the check on PlaceHolderVars was w

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w
Date: 2010-09-25 23:04:28
Message-ID: E1OzdnA-0004nB-N1@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix another join removal bug: the check on PlaceHolderVars was wrong.

The previous coding would decide that join removal was unsafe upon finding
a PlaceHolderVar that needed to be evaluated at the inner rel and then used
above the join. However, this fails to cover the case of PlaceHolderVars
that refer to both the inner rel and some other rels. Per bug report from
Andrus.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=c8c03d72e10cab3cc47975b2689c8efbb4eade94

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 18 +++++++++++++-----
src/test/regress/expected/join.out | 21 +++++++++++++++++++++
src/test/regress/sql/join.sql | 15 +++++++++++++++
3 files changed, 49 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-09-25 23:32:09 Re: pgsql: git_topo_order script, to match up commits across branches.
Previous Message Tom Lane 2010-09-25 21:17:33 pgsql: Further fixes to the pg_get_expr() security fix in back branches