diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-05 00:38:11 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-05 00:38:11 +0000 |
commit | a4996a895399a4b0363c7dace71fc6ce8acbc196 (patch) | |
tree | 9fe26cb35badc6a7b0c86a9db1eaf2e7ca95b142 /src/backend/utils/adt/ruleutils.c | |
parent | efe0d0808b055fb2f651dd3732bd770290eb2659 (diff) | |
download | postgresql-a4996a895399a4b0363c7dace71fc6ce8acbc196.tar.gz postgresql-a4996a895399a4b0363c7dace71fc6ce8acbc196.zip |
Replace the parser's namespace tree (which formerly had the same
representation as the jointree) with two lists of RTEs, one showing
the RTEs accessible by qualified names, and the other showing the RTEs
accessible by unqualified names. I think this is conceptually simpler
than what we did before, and it's sure a whole lot easier to search.
This seems to eliminate the parse-time bottleneck for deeply nested
JOIN structures that was exhibited by phil@vodafone.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index c6de4df714a..bc3e774d640 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -3,7 +3,7 @@ * back to source text * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.199 2005/06/03 23:05:29 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.200 2005/06/05 00:38:10 tgl Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -4009,8 +4009,8 @@ get_from_clause(Query *query, const char *prefix, deparse_context *context) * We use the query's jointree as a guide to what to print. However, * we must ignore auto-added RTEs that are marked not inFromCl. (These * can only appear at the top level of the jointree, so it's - * sufficient to check here.) Also ignore the rule pseudo-RTEs for NEW - * and OLD. + * sufficient to check here.) This check also ensures we ignore + * the rule pseudo-RTEs for NEW and OLD. */ foreach(l, query->jointree->fromlist) { @@ -4023,10 +4023,6 @@ get_from_clause(Query *query, const char *prefix, deparse_context *context) if (!rte->inFromCl) continue; - if (strcmp(rte->eref->aliasname, "*NEW*") == 0) - continue; - if (strcmp(rte->eref->aliasname, "*OLD*") == 0) - continue; } if (first) |