1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Fix another problem in 8.2 changes that allowed "one-time" qual conditions to

be checked at plan levels below the top; namely, we have to allow for Result
nodes inserted just above a nestloop inner indexscan.  Should think about
using the general Param mechanism to pass down outer-relation variables, but
for the moment we need a back-patchable solution.  Per report from Phil Frost.
This commit is contained in:
Tom Lane
2007-02-16 03:49:04 +00:00
parent 4ebb0cf9c3
commit 7ea758b0b1
2 changed files with 17 additions and 7 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.128 2007/01/22 01:35:20 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.129 2007/02/16 03:49:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -936,6 +936,14 @@ set_inner_join_references(Plan *inner_plan, indexed_tlist *outer_itlist)
outer_itlist);
}
}
else if (IsA(inner_plan, Result))
{
/* Recurse through a gating Result node (similar to Append case) */
Result *result = (Result *) inner_plan;
if (result->plan.lefttree)
set_inner_join_references(result->plan.lefttree, outer_itlist);
}
else if (IsA(inner_plan, TidScan))
{
TidScan *innerscan = (TidScan *) inner_plan;