SET NOT NULL: Call object-alter hook only after the catalog change

... otherwise, the function invoked by the hook might consult the
catalog and not see that the new constraint exists.

This relies on set_attnotnull doing CommandCounterIncrement()
after successfully modifying the catalog.

Oversight in commit 14e87ffa5c54.

Author: Artur Zakirov <[email protected]>
Backpatch-through: 18
Discussion: 
https://postgr.es/m/caknkynxupcjk-3xe0a3rmcc8b8v8kqvjbymvn6ysgpjs_qd...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e7975f1c06b585dcda645c6047e6f37cdfacce84

Modified Files
--------------
src/backend/commands/tablecmds.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Reply via email to