Tighten up SS_finalize_plan's computation of valid_params to exclude Params of
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Jul 2008 02:14:03 +0000 (02:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Jul 2008 02:14:03 +0000 (02:14 +0000)
commit1f9f1ab622285afc53f240a0e4120280fb3d549b
tree092bd7c7fd2b6269385314980fba60dc0e0259ec
parentbc7a9eeaeb2b76f95b3b6b3bcc63f4af985a420b
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.
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/subselect.c
src/include/optimizer/subselect.h