diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-05-04 10:09:11 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-05-04 10:09:11 -0400 |
commit | 72fabd4bfb5a8189591933cf244eabcaf83d4b8b (patch) | |
tree | 22e42264f5f8317a8ec01c16aa8ba63af8bbc390 | |
parent | bdaa0d2d726911e31b19ed3a02ecb33dfc6d3673 (diff) | |
download | postgresql-72fabd4bfb5a8189591933cf244eabcaf83d4b8b.tar.gz postgresql-72fabd4bfb5a8189591933cf244eabcaf83d4b8b.zip |
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 578b229718e8
Discussion: https://postgr.es/m/20210503231633.GA6994@alvherre.pgsql
-rw-r--r-- | src/backend/commands/tablecmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index d6785192840..1974c137985 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -9397,7 +9397,7 @@ ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd, copy_tg->tginitdeferred = cmdcon->initdeferred; CatalogTupleUpdate(tgrel, ©Tuple->t_self, copyTuple); - InvokeObjectPostAlterHook(TriggerRelationId, currcon->oid, 0); + InvokeObjectPostAlterHook(TriggerRelationId, tgform->oid, 0); heap_freetuple(copyTuple); } |