1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +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_clause.c,v 1.57 2000/03/15 23:31:04 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.58 2000/03/23 07:38:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -74,10 +74,9 @@ void
setTargetTable(ParseState *pstate, char *relname)
{
RangeTblEntry *rte;
int sublevels_up;
if ((refnameRangeTablePosn(pstate, relname, &sublevels_up) == 0)
|| (sublevels_up != 0))
/* look for relname only at current nesting level... */
if (refnameRangeTablePosn(pstate, relname, NULL) == 0)
rte = addRangeTableEntry(pstate, relname,
makeAttr(relname, NULL),
FALSE, FALSE, FALSE);