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

Commit 72fabd4

Browse files
committed
Fix OID passed to object-alter hook during ALTER CONSTRAINT
The OID of the constraint is used instead of the OID of the trigger -- an easy mistake to make. Apparently the object-alter hooks are not very well tested :-( Backpatch to 12, where this typo was introduced by 578b229 Discussion: https://postgr.es/m/20210503231633.GA6994@alvherre.pgsql
1 parent bdaa0d2 commit 72fabd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9397,7 +9397,7 @@ ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd,
93979397
copy_tg->tginitdeferred = cmdcon->initdeferred;
93989398
CatalogTupleUpdate(tgrel, &copyTuple->t_self, copyTuple);
93999399

9400-
InvokeObjectPostAlterHook(TriggerRelationId, currcon->oid, 0);
9400+
InvokeObjectPostAlterHook(TriggerRelationId, tgform->oid, 0);
94019401

94029402
heap_freetuple(copyTuple);
94039403
}

0 commit comments

Comments
 (0)