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

Started by Peter Eisentraut5 months ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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.universality@gmail.com>
Discussion: /messages/by-id/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(-)