Re: NOT ENFORCED constraint feature - Mailing list pgsql-hackers

From Amul Sul
Subject Re: NOT ENFORCED constraint feature
Date
Msg-id CAAJ_b95iCB7VVBp5vmt1bG1BQtk3c9d8ZkJqnQ9ykQQs4054=A@mail.gmail.com
Whole thread Raw
Responses Re: NOT ENFORCED constraint feature
List pgsql-hackers
On Tue, Feb 18, 2025 at 12:47 AM Álvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Hello,
>
> On 2025-Feb-17, Amul Sul wrote:
>
> > I have renamed AlterConstraintStmt to ATAlterConstraint as per your
> > suggestion in the attached version. Apart from this, there are no
> > other changes, as the final behavior is still unclear based on the
> > discussions so far.
>
> Okay, thanks.  I've taken your alterDeferrability from your later patch
> (renamed to just "deferrability").  Also, IMO the routine structure
> needs a bit of a revamp.  What do you think of the attached, which is
> mostly your 0001?  (Actually, now that I look, it seems I made more or
> less the same changes you'd be doing in 0008, so this should be okay.)
>

The patch looks quite reasonable, but I’m concerned that renaming
ATExecAlterConstrRecurse() and ATExecAlterChildConstr() exclusively
for deferrability might require the enforceability patch to duplicate
these functions, even though some operations (e.g., pg_constraint
updates and recursion on child constraints) could have been reused.

Regards,
Amul



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal - Reduce lock during first phase of VACUUM TRUNCATE from ACCESS EXCLUSIVE to EXCLUSIVE
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: ReplicationSlotRelease() crashes when the instance is in the single user mode