public inbox for [email protected]  
help / color / mirror / Atom feed
From: Amul Sul <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Ashutosh Bapat <[email protected]>
Cc: jian he <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Joel Jacobson <[email protected]>
Cc: Suraj Kharage <[email protected]>
Subject: Re: NOT ENFORCED constraint feature
Date: Fri, 28 Feb 2025 10:27:58 +0530
Message-ID: <CAAJ_b94OUAXbPLJ--N4-k7BU9yLDvpvnFXjVRVG0zNcamcEAgw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAAJ_b96Jit0hu0KYNDUM6L7wg2hYRjXu2VOGSBgZT8LGZOTcJA@mail.gmail.com>
	<[email protected]>

On Thu, Feb 27, 2025 at 4:48 PM Álvaro Herrera <[email protected]> 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






view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: NOT ENFORCED constraint feature
  In-Reply-To: <CAAJ_b94OUAXbPLJ--N4-k7BU9yLDvpvnFXjVRVG0zNcamcEAgw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox