aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/sql
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@kurilemu.de>2025-07-03 11:46:12 +0200
committerÁlvaro Herrera <alvherre@kurilemu.de>2025-07-03 11:46:12 +0200
commit647cffd2f3210818f3882a1ea40cfbe0a4ea8fd7 (patch)
tree2d99140cd8f907ffe78a249ceac57c891cdd495a /src/test/regress/sql
parent87251e114967d668c8f90ed9fb8c8a8834c2d288 (diff)
downloadpostgresql-master.tar.gz
postgresql-master.zip
Prevent creation of duplicate not-null constraints for domainsHEADmaster
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
Diffstat (limited to 'src/test/regress/sql')
-rw-r--r--src/test/regress/sql/domain.sql3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/regress/sql/domain.sql b/src/test/regress/sql/domain.sql
index b752a63ab5f..b8f5a639712 100644
--- a/src/test/regress/sql/domain.sql
+++ b/src/test/regress/sql/domain.sql
@@ -602,6 +602,9 @@ insert into domain_test values (1, 2);
-- should fail
alter table domain_test add column c str_domain;
+-- disallow duplicated not-null constraints
+create domain int_domain1 as int constraint nn1 not null constraint nn2 not null;
+
create domain str_domain2 as text check (value <> 'foo') default 'foo';
-- should fail