| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | Cédric Villemain <cedric(dot)villemain(at)data-bene(dot)io> |
| Cc: | Amul Sul <sulamul(at)gmail(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: alter check constraint enforceability |
| Date: | 2026-02-09 12:36:14 |
| Message-ID: | CACJufxF0gXGoxEsqQzm1EuBacyyG7WuX_Fj6mN8qgadrGaUjpA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Feb 9, 2026 at 5:55 PM Cédric Villemain
<cedric(dot)villemain(at)data-bene(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-02-09 12:40:51 | Re: log_min_messages per backend type |
| Previous Message | Aleksander Alekseev | 2026-02-09 12:19:07 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |