mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Updated deferred trigger patch.
Neil Conway
This commit is contained in:
parent
c77bc1380a
commit
5e36cbe6ee
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.143 2003/01/08 22:28:32 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.144 2003/01/08 22:29:23 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2346,11 +2346,6 @@ DeferredTriggerSaveEvent(ResultRelInfo *relinfo, int event, bool row_trigger,
|
|||||||
else
|
else
|
||||||
ItemPointerSetInvalid(&(newctid));
|
ItemPointerSetInvalid(&(newctid));
|
||||||
|
|
||||||
/*
|
|
||||||
* Create a new event
|
|
||||||
*/
|
|
||||||
oldcxt = MemoryContextSwitchTo(deftrig_cxt);
|
|
||||||
|
|
||||||
if (row_trigger)
|
if (row_trigger)
|
||||||
{
|
{
|
||||||
ntriggers = trigdesc->n_after_row[event];
|
ntriggers = trigdesc->n_after_row[event];
|
||||||
@ -2382,6 +2377,11 @@ DeferredTriggerSaveEvent(ResultRelInfo *relinfo, int event, bool row_trigger,
|
|||||||
if (n_enabled_triggers == 0)
|
if (n_enabled_triggers == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a new event
|
||||||
|
*/
|
||||||
|
oldcxt = MemoryContextSwitchTo(deftrig_cxt);
|
||||||
|
|
||||||
new_size = offsetof(DeferredTriggerEventData, dte_item[0]) +
|
new_size = offsetof(DeferredTriggerEventData, dte_item[0]) +
|
||||||
n_enabled_triggers * sizeof(DeferredTriggerEventItem);
|
n_enabled_triggers * sizeof(DeferredTriggerEventItem);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user