mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Fixed failed assertion happening in multiple action rules
when parsestate in makeRangeTable() already contains an opened p_target_relation. Jan
This commit is contained in:
parent
4390b0bfbe
commit
7ab88a16a1
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.26 1998/09/25 13:36:03 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.27 1999/02/02 12:57:51 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -62,8 +62,13 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
|
||||
else
|
||||
rte = refnameRangeTableEntry(pstate, relname);
|
||||
|
||||
/* This could only happen for multi-action rules */
|
||||
if (pstate->p_target_relation != NULL)
|
||||
{
|
||||
heap_close(pstate->p_target_relation);
|
||||
}
|
||||
|
||||
pstate->p_target_rangetblentry = rte;
|
||||
Assert(pstate->p_target_relation == NULL);
|
||||
pstate->p_target_relation = heap_open(rte->relid);
|
||||
/* will close relation later */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user