File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/backend/optimizer/plan Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.45 2000/11/16 22:30:25 tgl Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.46 2000/11/21 00:17:59 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -613,8 +613,15 @@ SS_finalize_plan(Plan *plan)
613613 break ;
614614
615615 case T_SubqueryScan :
616+ /*
617+ * In a SubqueryScan, SS_finalize_plan has already been run
618+ * on the subplan by the inner invocation of subquery_planner,
619+ * so there's no need to do it again. Instead, just pull out
620+ * the subplan's extParams list, which represents the params
621+ * it needs from my level and higher levels.
622+ */
616623 results .paramids = set_unioni (results .paramids ,
617- SS_finalize_plan ((( SubqueryScan * ) plan )-> subplan ) );
624+ (( SubqueryScan * ) plan )-> subplan -> extParam );
618625 break ;
619626
620627 case T_IndexScan :
You can’t perform that action at this time.
0 commit comments