summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/setrefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/plan/setrefs.c')
-rw-r--r--src/backend/optimizer/plan/setrefs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c
index 298c8d1cff6..4fd3546368e 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.126 2006/10/04 00:29:54 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.126.2.1 2007/02/16 03:49:10 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -937,6 +937,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;