1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Remove no-longer-necessary restriction against uplevel correlation vars

outside WHERE clause.  Fix a couple of places that didn't handle uplevel
refs cleanly.
This commit is contained in:
Tom Lane
2000-03-23 07:38:30 +00:00
parent dadb14fa60
commit 37ab088770
3 changed files with 23 additions and 33 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.76 2000/03/19 00:19:39 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.77 2000/03/23 07:38:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -495,6 +495,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
{
RangeTblEntry *rte;
int vnum;
int sublevels_up;
/*
* a relation
@ -516,7 +517,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
relname = rte->relname;
vnum = refnameRangeTablePosn(pstate, rte->eref->relname, NULL);
vnum = refnameRangeTablePosn(pstate, rte->eref->relname,
&sublevels_up);
/*
* for func(relname), the param to the function is the tuple
@ -527,7 +529,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
*/
toid = typeTypeId(typenameType(relname));
/* replace it in the arg list */
lfirst(i) = makeVar(vnum, 0, toid, -1, 0);
lfirst(i) = makeVar(vnum, 0, toid, -1, sublevels_up);
}
else if (!attisset)
{