mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user