public inbox for [email protected]
help / color / mirror / Atom feedFrom: Artur Zakirov <[email protected]>
To: Postgres hackers <[email protected]>
Subject: Order of InvokeObjectPostAlterHook within ATExecSetNotNull
Date: Wed, 18 Mar 2026 17:21:06 +0100
Message-ID: <CAKNkYnxUPCJk-3Xe0A3rmCC8B8V8kqVJbYMVN6ySGpjs_qd7dQ@mail.gmail.com> (raw)
Hello hackers!
The commit 14e87ff added pg_constraint rows for not-null [1]. The
consequence of the patch is that it changed the order of
InvokeObjectPostAlterHook() call and update of "attnotnull" field in
the catalog. Before the update was before the call of the hook [2].
And now "attnotnull" is updated after the call of
InvokeObjectPostAlterHook() [3].
This is a noticeable change to extensions which use
"object_access_hook" since they see a bit of stale information about
the attribute.
Is this an intended behavior or rather a bug?
1 - https://postgr.es/m/[email protected]
2 - https://github.com/postgres/postgres/blob/REL_17_9/src/backend/commands/tablecmds.c#L7818
3 - https://github.com/postgres/postgres/blob/REL_18_1/src/backend/commands/tablecmds.c#L8043-L8047
--
Kind regards,
Artur
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Order of InvokeObjectPostAlterHook within ATExecSetNotNull
In-Reply-To: <CAKNkYnxUPCJk-3Xe0A3rmCC8B8V8kqVJbYMVN6ySGpjs_qd7dQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox