From: Bruce Momjian Date: Mon, 14 Oct 1996 03:53:53 +0000 (+0000) Subject: More closing of relations left open by parser. X-Git-Tag: REL2_0~451 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83cb7298876edadba8e321a62f7ef4c6d11bfcf6;p=postgresql More closing of relations left open by parser. --- diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 5a8cbb7e4e..e28ea8037e 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.6 1996/10/13 04:25:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.7 1996/10/14 03:53:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -831,6 +831,8 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList) pstate->p_rtable = lappend(pstate->p_rtable, ent); } x = RangeTablePosn(pstate->p_rtable, relname); + if (pstate->p_current_rel != NULL) + heap_close(pstate->p_current_rel); pstate->p_current_rel = heap_openr(VarnoGetRelname(pstate,x)); if (pstate->p_current_rel == NULL) elog(WARN,"invalid relation name");