File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/backend/optimizer/plan Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.57 1999/08/22 20:14:48 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.58 1999/10/30 23:07:55 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -110,8 +110,13 @@ set_plan_references(Plan *plan)
110110 set_uppernode_references (plan , (Index ) 0 );
111111 break ;
112112 case T_Result :
113- /* XXX why does Result use a different subvarno? */
114- set_uppernode_references (plan , (Index ) OUTER );
113+ /* Result may or may not have a subplan; no need to fix up
114+ * subplan references if it hasn't got one...
115+ *
116+ * XXX why does Result use a different subvarno from Agg/Group?
117+ */
118+ if (plan -> lefttree != NULL )
119+ set_uppernode_references (plan , (Index ) OUTER );
115120 fix_opids (((Result * ) plan )-> resconstantqual );
116121 break ;
117122 case T_Append :
You can’t perform that action at this time.
0 commit comments