]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Prevent creation of duplicate not-null constraints for domains
authorÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 3 Jul 2025 09:46:12 +0000 (11:46 +0200)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 3 Jul 2025 09:46:12 +0000 (11:46 +0200)
commit8af310b331940ff5efd19402a3f8ee5521eb821a
treefbc9f17b32468e56b18f3a5dedb5f2bffa9dd9b7
parentf0151e2a4ef13949b4402b9d7ee0f45209cc0126
Prevent creation of duplicate not-null constraints for domains

This was previously harmless, but now that we create pg_constraint rows
for those, duplicates are not welcome anymore.

Backpatch to 18.

Co-authored-by: jian he <jian.universality@gmail.com>
Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CACJufxFSC0mcQ82bSk58sO-WJY4P-o4N6RD2M0D=DD_u_6EzdQ@mail.gmail.com
src/backend/commands/typecmds.c
src/test/regress/expected/domain.out
src/test/regress/sql/domain.sql