pgsql: SET NOT NULL: Call object-alter hook only after the catalog chan - Mailing list pgsql-committers

From Álvaro Herrera
Subject pgsql: SET NOT NULL: Call object-alter hook only after the catalog chan
Date
Msg-id E1w3a7b-000eG8-1e@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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 <zaartur@gmail.com>
Backpatch-through: 18
Discussion: https://postgr.es/m/CAKNkYnxUPCJk-3Xe0A3rmCC8B8V8kqVJbYMVN6ySGpjs_qd7dQ@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(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: test_plan_advice: Set TAP test priority 50 in meson.build.
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Fix self-join removal to update bare Var references in join clau