Re: alter check constraint enforceability - Mailing list pgsql-hackers

From jian he
Subject Re: alter check constraint enforceability
Date
Msg-id CACJufxF0gXGoxEsqQzm1EuBacyyG7WuX_Fj6mN8qgadrGaUjpA@mail.gmail.com
Whole thread
In response to Re: alter check constraint enforceability  (Cédric Villemain <cedric.villemain@data-bene.io>)
Responses Re: alter check constraint enforceability
List pgsql-hackers
On Mon, Feb 9, 2026 at 5:55 PM Cédric Villemain
<cedric.villemain@data-bene.io> wrote:
>
> I have some questions/comments (no change on status, I didn't test)
>
> - FK are constraint triggers, does it makes sense to align
> "ATExecAlterFKConstrEnforceability" renaming with other functions like
> "AlterConstrTriggerDeferrability" ?
>

do you mean changing
ATExecAlterConstrDeferrability
to
ATExecAlterFKConstrDeferrability
?

If so, it makes sense and also improves readability, IMO.
However, since only FK supports changing deferrability—and we are not
modifying deferrability here,
the incentive for this renaming change is kind of lower.

> - I also wonder if it makes sense to manage NOT NULL together with
> CHECK, like in ATAddCheckNNConstraint.... ?
>
See ATExecAlterConstraintInternal.
We do not support changing enforceability of NOT NULL, since NOT NULL
NOT ENFORCED is not supported.
I do have a patch for NOT NULL NOT ENFORCED,
https://commitfest.postgresql.org/patch/6029



--
jian
https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Next
From: Alvaro Herrera
Date:
Subject: Re: log_min_messages per backend type