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

Commit 360fd1a

Browse files
committed
Fix logical replication to fire BEFORE ROW DELETE triggers.
Before, that would fail to happen unless a BEFORE ROW UPDATE trigger was also present. Noted by me while reviewing a patch from Masahiko Sawada, who also wrote this patch. Reviewed by Petr Jelinek. Discussion: http://postgr.es/m/CA+TgmobAZvCxduG8y_mQKBK7nz-vhbdLvjM354KEFozpuzMN5A@mail.gmail.com
1 parent 31079a4 commit 360fd1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/execReplication.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ ExecSimpleRelationDelete(EState *estate, EPQState *epqstate,
511511

512512
/* BEFORE ROW DELETE Triggers */
513513
if (resultRelInfo->ri_TrigDesc &&
514-
resultRelInfo->ri_TrigDesc->trig_update_before_row)
514+
resultRelInfo->ri_TrigDesc->trig_delete_before_row)
515515
{
516516
skip_tuple = !ExecBRDeleteTriggers(estate, epqstate, resultRelInfo,
517517
&searchslot->tts_tuple->t_self,

0 commit comments

Comments
 (0)