1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

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.
This commit is contained in:
Tom Lane
2008-07-10 02:14:03 +00:00
parent 772a6d45ef
commit eaf1b5d348
4 changed files with 75 additions and 68 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.233 2008/05/02 21:26:09 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planner.c,v 1.234 2008/07/10 02:14:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -459,7 +459,7 @@ subquery_planner(PlannerGlobal *glob, Query *parse,
*/
if (list_length(glob->subplans) != num_old_subplans ||
root->query_level > 1)
SS_finalize_plan(root, plan);
SS_finalize_plan(root, plan, true);
/* Return internal info if caller wants it */
if (subroot)