mirror of
https://github.com/postgres/postgres.git
synced 2026-05-28 04:35:45 -04: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
575c0edaef
commit
92c6b5d7b9
1 changed files with 7 additions and 2 deletions
|
|
@ -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.26.2.1 1999/02/02 12:56:55 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 a new issue