diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-26 05:09:06 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-26 05:09:06 +0000 |
commit | 37d20eb8558607e18816849a0a3f3d941317dc13 (patch) | |
tree | 95109e75dd63b2c488256f68c63b9386b9ac9d3c /src/backend/optimizer/util/tlist.c | |
parent | 5adebf83b6cffbf4133ff97dbe6d5da0ff59bff1 (diff) |
Clean up some mistakes in handling of uplevel Vars in planner.
Most parts of the planner should ignore, or indeed never even see, uplevel
Vars because they will be or have been replaced by Params. There were a
couple of places that got it wrong though, probably my fault from recent
changes...
Diffstat (limited to 'src/backend/optimizer/util/tlist.c')
-rw-r--r-- | src/backend/optimizer/util/tlist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index dfe2963581f..43007f33fff 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.40 1999/08/22 20:14:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.41 1999/08/26 05:09:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -147,6 +147,10 @@ new_unsorted_tlist(List *targetlist) * flatten_tlist * Create a target list that only contains unique variables. * + * Note that Vars with varlevelsup > 0 are not included in the output + * tlist. We expect that those will eventually be replaced with Params, + * but that probably has not happened at the time this routine is called. + * * 'tlist' is the current target list * * Returns the "flattened" new target list. @@ -157,7 +161,7 @@ new_unsorted_tlist(List *targetlist) List * flatten_tlist(List *tlist) { - List *vlist = pull_var_clause((Node *) tlist); + List *vlist = pull_var_clause((Node *) tlist, false); List *new_tlist; new_tlist = add_to_flat_tlist(NIL, vlist); |