summaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-04 19:19:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-04 19:19:42 +0000
commite18e8f873594fd4ff2f12e734a624102d3ef1e39 (patch)
tree2be63f655263ca41ca15ea0f4e018bab97bfe3c0 /src/backend/parser/parse_clause.c
parentfb91a83e0ebf11b99148d15891188333381f82b1 (diff)
downloadpostgresql-e18e8f873594fd4ff2f12e734a624102d3ef1e39.tar.gz
Change expandRTE() and ResolveNew() back to taking just the single
RTE of interest, rather than the whole rangetable list. This makes the API more understandable and avoids duplicate RTE lookups. This patch reverts no-longer-needed portions of my patch of 2004-08-19.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r--src/backend/parser/parse_clause.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index 42960d4376..8d282d13e4 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.140 2005/04/13 16:50:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.141 2005/06/04 19:19:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -663,7 +663,8 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels)
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(j->larg));
leftrti = 0; /* keep compiler quiet */
}
- expandRTE(pstate->p_rtable, leftrti, 0, false,
+ rte = rt_fetch(leftrti, pstate->p_rtable);
+ expandRTE(rte, leftrti, 0, false,
&l_colnames, &l_colvars);
if (IsA(j->rarg, RangeTblRef))
@@ -675,7 +676,8 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels)
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(j->rarg));
rightrti = 0; /* keep compiler quiet */
}
- expandRTE(pstate->p_rtable, rightrti, 0, false,
+ rte = rt_fetch(rightrti, pstate->p_rtable);
+ expandRTE(rte, rightrti, 0, false,
&r_colnames, &r_colvars);
/*