diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-06 15:15:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-10-06 15:15:22 +0000 |
commit | e64bb65aff3f53b4f56b4a1ee549930b568cec99 (patch) | |
tree | 805774acaf6a9bb8b10b0d2abc483aeba4a989d4 /src/include | |
parent | 5f853c655663bf829c02895de2b445a5f3caa24b (diff) |
Fix GetCTEForRTE() to deal with the possibility that the RTE it's given came
from a query level above the current ParseState.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/parser/parse_relation.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index f5212c421b7..84cfa97ba36 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.60 2008/10/06 02:12:56 tgl Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.61 2008/10/06 15:15:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -34,7 +34,8 @@ extern int RTERangeTablePosn(ParseState *pstate, extern RangeTblEntry *GetRTEByRangeTablePosn(ParseState *pstate, int varno, int sublevels_up); -extern CommonTableExpr *GetCTEForRTE(ParseState *pstate, RangeTblEntry *rte); +extern CommonTableExpr *GetCTEForRTE(ParseState *pstate, RangeTblEntry *rte, + int rtelevelsup); extern Node *scanRTEForColumn(ParseState *pstate, RangeTblEntry *rte, char *colname, int location); extern Node *colNameToVar(ParseState *pstate, char *colname, bool localonly, |