Re: refactor AlterDomainAddConstraint (alter domain add constraint) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: refactor AlterDomainAddConstraint (alter domain add constraint)
Date
Msg-id 202503101837.6hjg2wxzndtj@alvherre.pgsql
Whole thread Raw
List pgsql-hackers
Hello,

On 2025-Jan-15, jian he wrote:

> we cannot error out AlterDomainAddConstraint for cases like ALTER
> DOMAIN ADD CHECK NO INHERIT.
> because "NO INHERIT" is actually a separate Constraint Node, and
> AlterDomainAddConstraint
> can only handle one Constraint node.

I had forgotten this thread, and I ended up implementing a different
solution for this issue, which I just posted at
  https://postgr.es/m/202503101758.ipn3g64twfye@alvherre.pgsql

I like my patch better than this approach because it allows us to solve
the same problem as it appears in other parts of the grammar, and also
because it avoids the bit fiddling which is harder to maintain later on.
If you'd care to have a look at it, I'd appreciate it.

Thanks

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Parallel heap vacuum
Next
From: Melanie Plageman
Date:
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring