Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 91a6b38

Browse filesBrowse 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 a6a3a27 commit 91a6b38
Copy full SHA for 91a6b38

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/backend/commands/tablecmds.c

Copy file name to clipboardExpand all lines: src/backend/commands/tablecmds.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9847,7 +9847,7 @@ ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd,
98479847
copy_tg->tginitdeferred = cmdcon->initdeferred;
98489848
CatalogTupleUpdate(tgrel, &copyTuple->t_self, copyTuple);
98499849

9850-
InvokeObjectPostAlterHook(TriggerRelationId, currcon->oid, 0);
9850+
InvokeObjectPostAlterHook(TriggerRelationId, tgform->oid, 0);
98519851

98529852
heap_freetuple(copyTuple);
98539853
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.