mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Fix the implicit-RTE code to be able to handle implicit RTEs for CTEs, as
well as regular tables. Per discussion, this seems necessary to meet the principle of least astonishment. In passing, simplify the error messages in warnAutoRange(). Now that we have parser error position info for these errors, it doesn't seem very useful to word the error message differently depending on whether we are inside a sub-select or not.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.59 2008/10/04 21:56:55 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.60 2008/10/06 02:12:56 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -23,6 +23,9 @@ extern RangeTblEntry *refnameRangeTblEntry(ParseState *pstate,
|
||||
const char *refname,
|
||||
int location,
|
||||
int *sublevels_up);
|
||||
extern CommonTableExpr *scanNameSpaceForCTE(ParseState *pstate,
|
||||
const char *refname,
|
||||
Index *ctelevelsup);
|
||||
extern void checkNameSpaceConflicts(ParseState *pstate, List *namespace1,
|
||||
List *namespace2);
|
||||
extern int RTERangeTablePosn(ParseState *pstate,
|
||||
|
Reference in New Issue
Block a user