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/include/parser/parse_relation.h | |
parent | efe0d0808b055fb2f651dd3732bd770290eb2659 (diff) | |
download | postgresql-a4996a895399a4b0363c7dace71fc6ce8acbc196.tar.gz |
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/include/parser/parse_relation.h')
-rw-r--r-- | src/include/parser/parse_relation.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index b74098e10c..e6d989cf87 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.50 2005/06/04 19:19:42 tgl Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.51 2005/06/05 00:38:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,8 +22,8 @@ extern RangeTblEntry *refnameRangeTblEntry(ParseState *pstate, const char *schemaname, const char *refname, int *sublevels_up); -extern void checkNameSpaceConflicts(ParseState *pstate, Node *namespace1, - Node *namespace2); +extern void checkNameSpaceConflicts(ParseState *pstate, List *namespace1, + List *namespace2); extern int RTERangeTablePosn(ParseState *pstate, RangeTblEntry *rte, int *sublevels_up); @@ -64,7 +64,8 @@ extern RangeTblEntry *addRangeTableEntryForJoin(ParseState *pstate, Alias *alias, bool inFromCl); extern void addRTEtoQuery(ParseState *pstate, RangeTblEntry *rte, - bool addToJoinList, bool addToNameSpace); + bool addToJoinList, + bool addToRelNameSpace, bool addToVarNameSpace); extern RangeTblEntry *addImplicitRTE(ParseState *pstate, RangeVar *relation); extern void expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up, bool include_dropped, |