1
0
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:
Tom Lane
2002-09-11 14:48:55 +00:00
parent d634a5903f
commit 6fdc44be71
8 changed files with 89 additions and 55 deletions

View File

@ -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