mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Tweak querytree-dependency-extraction code so that columns of tables
that are explicitly JOINed are not considered dependencies unless they are actually used in the query: mere presence in the joinaliasvars list of a JOIN RTE doesn't count as being used. The patch touches a number of files because I needed to generalize the API of query_tree_walker to support an additional flag bit, but the changes are otherwise quite small.
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.78 2002/09/04 20:31:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.79 2002/09/11 14:48:55 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -774,7 +774,7 @@ adjust_inherited_attrs(Node *node,
|
||||
if (newnode->resultRelation == old_rt_index)
|
||||
newnode->resultRelation = new_rt_index;
|
||||
query_tree_mutator(newnode, adjust_inherited_attrs_mutator,
|
||||
(void *) &context, false);
|
||||
(void *) &context, QTW_IGNORE_SUBQUERIES);
|
||||
return (Node *) newnode;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user