pgsql: Make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is a

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is a
Date: 2026-02-24 10:04:32
Message-ID: E1vupHM-000x4g-0Z@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is already validated

Currently, AlterDomainValidateConstraint will re-validate a constraint
that has already been validated, which would just waste cycles. This
operation should be a no-op when the constraint is already validated.
This also aligns with ATExecValidateConstraint.

Author: jian he <jian(dot)universality(at)gmail(dot)com>
Discussion: https://postgr.es/m/CACJufxG=-Dv9fPJHqkA9c-wGZ2dDOWOXSp-X-0K_G7r-DgaASw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a99c6b56ffa74dae49e6847cc6c113d000c8ebd0

Modified Files
--------------
src/backend/commands/typecmds.c | 44 +++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 19 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-02-24 10:31:54 pgsql: doc: Add link targets to CREATE/ALTER FOREIGN TABLE reference pa
Previous Message Peter Eisentraut 2026-02-24 09:42:06 pgsql: Allow ALTER COLUMN SET EXPRESSION on virtual columns with CHECK