From a4996a895399a4b0363c7dace71fc6ce8acbc196 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 5 Jun 2005 00:38:11 +0000 Subject: 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. --- src/include/parser/parse_relation.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/include/parser/parse_relation.h') diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index b74098e10c7..e6d989cf87e 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, -- cgit v1.2.3