Thread: Re: NOT ENFORCED constraint feature

Re: NOT ENFORCED constraint feature

From
Amul Sul
Date:
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



Re: NOT ENFORCED constraint feature

From
Álvaro Herrera
Date:
On 2025-Feb-18, Amul Sul wrote:

> 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.

True.  I'll give another look to your 0008 and Suraj's patch for
inheritability change, to avoid repetitive boilerplate as much as
possible.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/