Re: refactor AlterDomainAddConstraint (alter domain add constraint)

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: refactor AlterDomainAddConstraint (alter domain add constraint)
Date: 2025-11-26 12:07:38
Message-ID: 202511261203.r2esjfdh2ldy@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Nov-26, jian he wrote:

> (IMHO, it looks like big efforts to solve the same problem, also these bit
> fiddling for domain constraint unlikely to change in the future, e.g. we are
> unlike to add DEFERRABLE, INITIALLY DEFERRED, NO INHERIT constraints to domain.)

True.

I was thinking we would use the this mechanism to solve the issue for
constraint triggers, but in commit 87251e114967 I did that in a
different way. I think this one

> this thread: v5-0001-ALTER-DOMAIN-ADD-CONSTRAINT-error-message-enhance.patch

is a reasonable implementation, ugly though it is. We could handle the
checks for deferrability before calling processCASbits() though.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Tom: There seems to be something broken here.
Teodor: I'm in sackcloth and ashes... Fixed.
http://postgr.es/m/482D1632.8010507@sigaev.ru

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-11-26 12:08:13 Re: IPC/MultixactCreation on the Standby server
Previous Message Kirill Reshke 2025-11-26 11:56:52 Re: transformJsonFuncExpr pathspec cache lookup failed