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

Commit 7ab88a1

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Fixed failed assertion happening in multiple action rules
when parsestate in makeRangeTable() already contains an opened p_target_relation. Jan
1 parent 4390b0b commit 7ab88a1

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.27 1999/02/02 12:57:51 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)