diff options
| author | Tom Lane | 2008-10-22 20:17:52 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-10-22 20:17:52 +0000 |
| commit | 31468d05d89d494de00156e66c3e57d6dff9c79f (patch) | |
| tree | 2003474691158d0d9b87e9d1a06cb2f0f754e726 /src/include/nodes | |
| parent | b9856b67a7a762ab5bedfafbda4f654797d83996 (diff) | |
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.
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/relation.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index b5eb00a7a67..4ce13f808a2 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.162 2008/10/21 20:42:53 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.163 2008/10/22 20:17:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1290,6 +1290,9 @@ typedef struct AppendRelInfo * The idea is to evaluate the expression at (only) the ph_eval_at join level, * then allow it to bubble up like a Var until the ph_needed join level. * ph_needed has the same definition as attr_needed for a regular Var. + * + * We create a PlaceHolderInfo only after determining that the PlaceHolderVar + * is actually referenced in the plan tree. */ typedef struct PlaceHolderInfo |
