On Sat, Feb 1, 2025 at 8:31 PM jian he <jian.universal...@gmail.com> wrote: > > [...] > So the code should only call AlterConstrTriggerDeferrability, > not call ATExecAlterConstrEnforceability?
Right. Thank you for the report. We need to know whether the enforceability and/or deferability has actually been set or not before catalog update. Have you started working on the ALTER ... CONSTRAINT for the check constraint? I am thinking to start that. To fix this bug, we have two options: we could either throw an error as we don’t currently support altering enforceability and deferability together (which I’m not a fan of), or we could refactor the ALTER ... CONSTRAINT code to include more information which would allow us to perform the appropriate update action during the execution stage, and it would also help with altering check constraints. Regards, Amul