public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Amul Sul <[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: Alexandra Wang <[email protected]>
Cc: Suraj Kharage <[email protected]>
Subject: Re: NOT ENFORCED constraint feature
Date: Tue, 18 Mar 2025 20:03:30 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAJ_b94PTcHzp2BqOxQZ7S-Zxp2hGV192a=4V8dTifjypDPpEw@mail.gmail.com>

On 2025-Mar-12, Amul Sul wrote:

> On Tue, Mar 11, 2025 at 11:13 PM Peter Eisentraut <[email protected]> wrote:

> > I think the next step here is that you work to fix Álvaro's concerns
> > about the recursion structure.
> 
> Yes, I worked on that in the attached version. I refactored
> ATExecAlterConstraintInternal() and moved the code that updates the
> pg_constraint entry into a separate function (see 0001), so it can be
> called from the places where the entry needs to be updated, rather
> than revisiting ATExecAlterConstraintInternal(). In 0002,
> ATExecAlterConstraintInternal() is split into two functions:
> ATExecAlterConstrDeferrability() and
> ATExecAlterConstrInheritability(), which handle altering deferrability
> and inheritability, respectively. These functions are expected to
> recurse on themselves, rather than revisiting
> ATExecAlterConstraintInternal() as before. This approach simplifies
> things. Similarly can add ATExecAlterConstrEnforceability() which
> recurses itself.

Yeah, I gave this a look and I think this code layout is good.  There
are more functions now, but the code flow is simpler.

Thanks!

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





view thread (24+ 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], [email protected]
  Subject: Re: NOT ENFORCED constraint feature
  In-Reply-To: <[email protected]>

* 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