diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index dd2b4a51076..9b0aad95a0a 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8050,12 +8050,12 @@ ATExecSetNotNull(List **wqueue, Relation rel, char *conName, char *colName, ccon = linitial(cooked); ObjectAddressSet(address, ConstraintRelationId, ccon->conoid); - InvokeObjectPostAlterHook(RelationRelationId, - RelationGetRelid(rel), attnum); - /* Mark pg_attribute.attnotnull for the column and queue validation */ set_attnotnull(wqueue, rel, attnum, true, true); + InvokeObjectPostAlterHook(RelationRelationId, + RelationGetRelid(rel), attnum); + /* * Recurse to propagate the constraint to children that don't have one. */