| From: | Amul Sul <sulamul(at)gmail(dot)com> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
| Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Joel Jacobson <joel(at)compiler(dot)org>, Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com> |
| Subject: | Re: NOT ENFORCED constraint feature |
| Date: | 2025-02-28 04:57:58 |
| Message-ID: | CAAJ_b94OUAXbPLJ--N4-k7BU9yLDvpvnFXjVRVG0zNcamcEAgw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Feb 27, 2025 at 4:48 PM Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2025-Feb-27, Amul Sul wrote:
>
> > Attached is the rebased patch set against the latest master head,
> > which also includes a *new* refactoring patch (0001). In this patch,
> > I’ve re-added ATExecAlterChildConstr(), which is required for the main
> > feature patch (0008) to handle recursion from different places while
> > altering enforceability.
>
> I think you refer to ATExecAlterConstrEnforceability, which claims
> (falsely) that it is a subroutine to ATExecAlterConstrRecurse; in
> reality it is called from ATExecAlterConstraintInternal or at least
> that's what I see in your 0008. So I wonder if you haven't confused
> yourself here. If nothing else, that comments needs fixed. I didn't
> review these patches.
>
Yeah, that was intentional. I wanted to avoid recursion again by
hitting ATExecAlterChildConstr() at the end of
ATExecAlterConstraintInternal(). Also, I realized the value doesn’t
matter since recurse = false is explicitly set inside the
cmdcon->alterEnforceability condition. I wasn’t fully satisfied with
how we handled the recursion decision (code design), so I’ll give it
more thought. If I don’t find a better approach, I’ll add clearer
comments to explain the reasoning.
Regards,
Amul
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2025-02-28 05:14:17 | Re: Log connection establishment timings |
| Previous Message | Corey Huinker | 2025-02-28 04:34:40 | Re: Statistics Import and Export |