mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
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...
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user