Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 83cb729

Browse files
committed
More closing of relations left open by parser.
1 parent 1a865b8 commit 83cb729

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/parser/analyze.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.6 1996/10/13 04:25:42 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.7 1996/10/14 03:53:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -831,6 +831,8 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
831831
pstate->p_rtable = lappend(pstate->p_rtable, ent);
832832
}
833833
x = RangeTablePosn(pstate->p_rtable, relname);
834+
if (pstate->p_current_rel != NULL)
835+
heap_close(pstate->p_current_rel);
834836
pstate->p_current_rel = heap_openr(VarnoGetRelname(pstate,x));
835837
if (pstate->p_current_rel == NULL)
836838
elog(WARN,"invalid relation name");

0 commit comments

Comments
 (0)