From 83cb7298876edadba8e321a62f7ef4c6d11bfcf6 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 14 Oct 1996 03:53:53 +0000 Subject: [PATCH] More closing of relations left open by parser. --- src/backend/parser/analyze.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 2.40.0