diff options
| author | Tom Lane | 2008-07-10 02:14:03 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-07-10 02:14:03 +0000 |
| commit | eaf1b5d348981fefc8deb03e1e7234f698f26818 (patch) | |
| tree | 572d6b98a287725964663a0e4f9a4233ca3a6ec2 /src/include/optimizer | |
| parent | 772a6d45ef84d9868594c5ea41d68a9797db1de1 (diff) | |
Tighten up SS_finalize_plan's computation of valid_params to exclude Params of
the current query level that aren't in fact output parameters of the current
initPlans. (This means, for example, output parameters of regular subplans.)
To make this work correctly for output parameters coming from sibling
initplans requires rejiggering the API of SS_finalize_plan just a bit:
we need the siblings to be visible to it, rather than hidden as
SS_make_initplan_from_plan had been doing. This is really part of my response
to bug #4290, but I concluded this part probably shouldn't be back-patched,
since all that it's doing is to make a debugging cross-check tighter.
Diffstat (limited to 'src/include/optimizer')
| -rw-r--r-- | src/include/optimizer/subselect.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h index 150eaaf002d..bb60aac9d4f 100644 --- a/src/include/optimizer/subselect.h +++ b/src/include/optimizer/subselect.h @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/subselect.h,v 1.30 2008/01/01 19:45:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/subselect.h,v 1.31 2008/07/10 02:14:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -18,7 +18,8 @@ extern Node *convert_IN_to_join(PlannerInfo *root, SubLink *sublink); extern Node *SS_replace_correlation_vars(PlannerInfo *root, Node *expr); extern Node *SS_process_sublinks(PlannerInfo *root, Node *expr, bool isQual); -extern void SS_finalize_plan(PlannerInfo *root, Plan *plan); +extern void SS_finalize_plan(PlannerInfo *root, Plan *plan, + bool attach_initplans); extern Param *SS_make_initplan_from_plan(PlannerInfo *root, Plan *plan, Oid resulttype, int32 resulttypmod); |
