From e18e8f873594fd4ff2f12e734a624102d3ef1e39 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 4 Jun 2005 19:19:42 +0000 Subject: 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. --- src/backend/parser/parse_clause.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/backend/parser/parse_clause.c') 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); /* -- cgit v1.2.1