Commit 7e46348e authored by Bruce Momjian's avatar Bruce Momjian

FIx for regression-test found bug.

parent 7f31669b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.11 1998/01/20 22:11:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.12 1998/01/20 22:55:25 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -39,15 +39,18 @@ void ...@@ -39,15 +39,18 @@ void
makeRangeTable(ParseState *pstate, char *relname, List *frmList) makeRangeTable(ParseState *pstate, char *relname, List *frmList)
{ {
RangeTblEntry *rte; RangeTblEntry *rte;
int sublevels_up;
parseFromClause(pstate, frmList); parseFromClause(pstate, frmList);
if (relname == NULL) if (relname == NULL)
return; return;
Assert(pstate->p_rtable == NULL); if (refnameRangeTablePosn(pstate, relname, &sublevels_up) == 0 ||
sublevels_up != 0)
rte = addRangeTableEntry(pstate, relname, relname, FALSE, FALSE); rte = addRangeTableEntry(pstate, relname, relname, FALSE, FALSE);
else
rte = refnameRangeTableEntry(pstate, relname);
pstate->p_target_rangetblentry = rte; pstate->p_target_rangetblentry = rte;
Assert(pstate->p_target_relation == NULL); Assert(pstate->p_target_relation == NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment