make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is validated - Mailing list pgsql-hackers

From jian he
Subject make ALTER DOMAIN VALIDATE CONSTRAINT no-op when constraint is validated
Date
Msg-id CACJufxG=-Dv9fPJHqkA9c-wGZ2dDOWOXSp-X-0K_G7r-DgaASw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
hi.

Looking at AlterDomainValidateConstraint, it seems currently, ALTER
DOMAIN VALIDATE
CONSTRAINT will re-validate a VALID constraint, which
would just waste cycles.
Ideally, this operation should be a no-op.

The attached patch addresses this by making ALTER DOMAIN VALIDATE CONSTRAINT a
no-op in such cases.

ALTER TABLE VALIDATE CONSTRAINT is already a no-op when the constraint is VALID.

Attachment

pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: parallel_safe
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables