Skip to content

Commit 92c6b5d

Browse files
Jan WieckJan Wieck
authored andcommitted
Fixed failed assertion happening in multiple action rules
when parsestate in makeRangeTable() already contains an opened p_target_relation. Jan
1 parent 575c0ed commit 92c6b5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/parser/parse_clause.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.26 1998/09/25 13:36:03 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.26.2.1 1999/02/02 12:56:55 wieck Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -62,8 +62,13 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
6262
else
6363
rte = refnameRangeTableEntry(pstate, relname);
6464

65+
/* This could only happen for multi-action rules */
66+
if (pstate->p_target_relation != NULL)
67+
{
68+
heap_close(pstate->p_target_relation);
69+
}
70+
6571
pstate->p_target_rangetblentry = rte;
66-
Assert(pstate->p_target_relation == NULL);
6772
pstate->p_target_relation = heap_open(rte->relid);
6873
/* will close relation later */
6974
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy