OSDN Git Service

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)
commiteaf1b5d348981fefc8deb03e1e7234f698f26818
tree572d6b98a287725964663a0e4f9a4233ca3a6ec2
parent772a6d45ef84d9868594c5ea41d68a9797db1de1
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