diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-21 00:17:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-21 00:17:59 +0000 |
commit | 3030189b69a33be47698ab72baddf0b19c2dbb3a (patch) | |
tree | 8c44e477666c1893284e37fd2ca65ceee32a663e /src | |
parent | 712af72c779418101edc0bfc52099a06623f2ded (diff) | |
download | postgresql-3030189b69a33be47698ab72baddf0b19c2dbb3a.tar.gz postgresql-3030189b69a33be47698ab72baddf0b19c2dbb3a.zip |
Fix erroneous handling of parameters at SubqueryScan plan nodes,
per bug report from Don Baccus.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/optimizer/plan/subselect.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index c36e7fe7b81..4ebabc1e875 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.45 2000/11/16 22:30:25 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.46 2000/11/21 00:17:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -613,8 +613,15 @@ SS_finalize_plan(Plan *plan) break; case T_SubqueryScan: + /* + * In a SubqueryScan, SS_finalize_plan has already been run + * on the subplan by the inner invocation of subquery_planner, + * so there's no need to do it again. Instead, just pull out + * the subplan's extParams list, which represents the params + * it needs from my level and higher levels. + */ results.paramids = set_unioni(results.paramids, - SS_finalize_plan(((SubqueryScan *) plan)->subplan)); + ((SubqueryScan *) plan)->subplan->extParam); break; case T_IndexScan: |