summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPeter Eisentraut2012-04-03 05:11:51 +0000
committerPeter Eisentraut2012-04-03 05:11:51 +0000
commit38b9693fd9847f4dcf6ff2fc469a7f2aac6385d9 (patch)
tree2c3e204e5504a6780a8d8ed37fed08b8e32fe63e /src/test
parentc2cc5c347440e48bc4d0e4ed083db2f3966a0e90 (diff)
Add support for renaming domain constraints
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/domain.out7
-rw-r--r--src/test/regress/sql/domain.sql10
2 files changed, 17 insertions, 0 deletions
diff --git a/src/test/regress/expected/domain.out b/src/test/regress/expected/domain.out
index e713b970569..03204ff79f7 100644
--- a/src/test/regress/expected/domain.out
+++ b/src/test/regress/expected/domain.out
@@ -659,3 +659,10 @@ create domain testdomain1 as int;
alter domain testdomain1 rename to testdomain2;
alter type testdomain2 rename to testdomain3; -- alter type also works
drop domain testdomain3;
+--
+-- Renaming domain constraints
+--
+create domain testdomain1 as int constraint unsigned check (value > 0);
+alter domain testdomain1 rename constraint unsigned to unsigned_foo;
+alter domain testdomain1 drop constraint unsigned_foo;
+drop domain testdomain1;
diff --git a/src/test/regress/sql/domain.sql b/src/test/regress/sql/domain.sql
index ad049b7ba54..5af36af1ef1 100644
--- a/src/test/regress/sql/domain.sql
+++ b/src/test/regress/sql/domain.sql
@@ -496,3 +496,13 @@ create domain testdomain1 as int;
alter domain testdomain1 rename to testdomain2;
alter type testdomain2 rename to testdomain3; -- alter type also works
drop domain testdomain3;
+
+
+--
+-- Renaming domain constraints
+--
+
+create domain testdomain1 as int constraint unsigned check (value > 0);
+alter domain testdomain1 rename constraint unsigned to unsigned_foo;
+alter domain testdomain1 drop constraint unsigned_foo;
+drop domain testdomain1;