Dept of better ideas: refrain from creating the planner's placeholder_list
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Oct 2008 20:17:52 +0000 (20:17 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Oct 2008 20:17:52 +0000 (20:17 +0000)
commite80fde56022593d576f7cc0dd069e79febb17217
treeebd75e46014729f8ede87980d0b0c86c9981f1c6
parentf0b4483c2a0a8d43ab301c885b86481697292541
Dept of better ideas: refrain from creating the planner's placeholder_list
until vars are distributed to rels during query_planner() startup.  We don't
really need it before that, and not building it early has some advantages.
First, we don't need to put it through the various preprocessing steps, which
saves some cycles and eliminates the need for a number of routines to support
PlaceHolderInfo nodes at all.  Second, this means one less unused plan for any
sub-SELECT appearing in a placeholder's expression, since we don't build
placeholder_list until after sublink expansion is complete.
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/placeholder.c
src/backend/optimizer/util/var.c
src/backend/rewrite/rewriteManip.c
src/include/nodes/relation.h