diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-11 14:48:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-11 14:48:55 +0000 |
commit | 6fdc44be71e7732b4a9550d04befcc9144ef188f (patch) | |
tree | 31f001c17376b228922d1424c6b70e477318e2ad /src/backend/rewrite/rewriteHandler.c | |
parent | d634a5903f615a45cb463155c04d3df904e1b91a (diff) |
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.
Diffstat (limited to 'src/backend/rewrite/rewriteHandler.c')
-rw-r--r-- | src/backend/rewrite/rewriteHandler.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index d434e9e2fb8..95fc726227f 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.108 2002/09/04 20:31:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.109 2002/09/11 14:48:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -822,11 +822,12 @@ fireRIRrules(Query *parsetree) } /* - * Recurse into sublink subqueries, too. + * Recurse into sublink subqueries, too. But we already did the ones + * in the rtable. */ if (parsetree->hasSubLinks) query_tree_walker(parsetree, fireRIRonSubLink, NULL, - false /* already handled the ones in rtable */ ); + QTW_IGNORE_SUBQUERIES); /* * If the query was marked having aggregates, check if this is still |