pgsql: Fix planner bug with nested PlaceHolderVars in 9.2 (only).

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix planner bug with nested PlaceHolderVars in 9.2 (only).
Date: 2014-06-10 01:29:01
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix planner bug with nested PlaceHolderVars in 9.2 (only).

Commit 9e7e29c75ad441450f9b8287bd51c13521641e3b fixed some problems with
LATERAL references in PlaceHolderVars, one of which was that "createplan.c
wasn't handling nested PlaceHolderVars properly". I failed to see that
this problem might occur in older versions as well; but it can, as
demonstrated in bug #10587 from Geoff Speicher. In this case the nesting
occurs due to push-down of PlaceHolderVar expressions into a parameterized
path. So, back-patch the relevant changes from 9e7e29c75ad4 into 9.2 where
parameterized paths were introduced. (Perhaps I'm still being too myopic,
but I'm hesitant to change older branches without some evidence that the
case can occur there.)

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/187ae17300776f48b2bd9d0737923b1bf70f606e

Modified Files
--------------
src/backend/nodes/equalfuncs.c | 16 ++++---
src/backend/optimizer/plan/createplan.c | 39 ++++++++++++----
src/test/regress/expected/join.out | 74 +++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 58 ++++++++++++++++++++++++
4 files changed, 172 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-06-10 01:37:30 pgsql: Forward-port regression test for bug #10587 into 9.3 and HEAD.
Previous Message Tom Lane 2014-06-09 20:31:29 pgsql: Fix infinite loop when splitting inner tuples in SPGiST text ind