Prevent creation of duplicate not-null constraints for domains
Álvaro Herrera <alvherre@kurilemu.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/typecmds.c | modified | +11 −3 |
| src/test/regress/expected/domain.out | modified | +5 −0 |
| src/test/regress/sql/domain.sql | modified | +3 −0 |
Discussion
- CREATE DOMAIN create two not null constraints 4 messages · 2025-06-01 → 2025-07-03