pgsql: Fix recursion into previously planned sub-query in examine_simpl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix recursion into previously planned sub-query in examine_simpl
Date: 2011-09-29 22:13:57
Message-ID: E1R9Ord-0000iy-Fg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix recursion into previously planned sub-query in examine_simple_variable.

This code was looking at the sub-Query tree as seen in the parent query's
RangeTblEntry; but that's the pristine parser output, and what we need to
look at is the tree as it stands at the completion of planning. Otherwise
we might pick up a Var that references a subquery that got flattened and
hence has no RelOptInfo in the subroot. Per report from Peter Geoghegan.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/79edb2b1dc33166b576f51a8255a7614f748d9c9

Modified Files
--------------
src/backend/utils/adt/selfuncs.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-09-30 23:49:11 pgsql: Support GiST index support functions that want to cache data acr
Previous Message Bruce Momjian 2011-09-29 21:21:37 pgsql: Fix pg_upgrade for EXEC_BACKEND builds (e.g. Windows) by properl