diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-06 02:12:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-06 02:12:56 +0000 |
commit | 0ff384f0bcd1a828dc994f02cbbd8bfc3405e94d (patch) | |
tree | e7036f8f1f6ac1c19b27aff95c98fa6669f8a975 /src/include/parser/parse_relation.h | |
parent | af88c9bbecf56afa2f2d7abe1dad927ca0287261 (diff) | |
download | postgresql-0ff384f0bcd1a828dc994f02cbbd8bfc3405e94d.tar.gz postgresql-0ff384f0bcd1a828dc994f02cbbd8bfc3405e94d.zip |
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.
Diffstat (limited to 'src/include/parser/parse_relation.h')
-rw-r--r-- | src/include/parser/parse_relation.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index 9c81d4b50b5..f5212c421b7 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -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, |