diff options
author | Andrew Dunstan | 2006-02-04 19:06:47 +0000 |
---|---|---|
committer | Andrew Dunstan | 2006-02-04 19:06:47 +0000 |
commit | f8b54fe6ed7a2eae575d365091d136b4a4068316 (patch) | |
tree | 4f3eedce55525759add7704eef65ea66c69989d2 /src/test | |
parent | 3fa9c416ed14f1d46567fdcf99c8d639034dbeec (diff) |
DROP IF EXISTS for ROLE/USER/GROUP
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/drop_if_exists.out | 24 | ||||
-rw-r--r-- | src/test/regress/sql/drop_if_exists.sql | 27 |
2 files changed, 51 insertions, 0 deletions
diff --git a/src/test/regress/expected/drop_if_exists.out b/src/test/regress/expected/drop_if_exists.out index 10feb3f9866..092c90403a0 100644 --- a/src/test/regress/expected/drop_if_exists.out +++ b/src/test/regress/expected/drop_if_exists.out @@ -65,3 +65,27 @@ ERROR: type "test_domain_exists" does not exist DROP TABLE IF EXISTS test_exists; DROP TABLE test_exists; ERROR: table "test_exists" does not exist +--- +--- role/user/group +--- +CREATE USER tu1; +CREATE ROLE tr1; +CREATE GROUP tg1; +DROP USER tu2; +ERROR: role "tu2" does not exist +DROP USER IF EXISTS tu1, tu2; +NOTICE: role "tu2" does not exist, skipping +DROP USER tu1; +ERROR: role "tu1" does not exist +DROP ROLE tr2; +ERROR: role "tr2" does not exist +DROP ROLE IF EXISTS tr1, tr2; +NOTICE: role "tr2" does not exist, skipping +DROP ROLE tr1; +ERROR: role "tr1" does not exist +DROP GROUP tg2; +ERROR: role "tg2" does not exist +DROP GROUP IF EXISTS tg1, tg2; +NOTICE: role "tg2" does not exist, skipping +DROP GROUP tg1; +ERROR: role "tg1" does not exist diff --git a/src/test/regress/sql/drop_if_exists.sql b/src/test/regress/sql/drop_if_exists.sql index 7addedaa734..ae7543fc438 100644 --- a/src/test/regress/sql/drop_if_exists.sql +++ b/src/test/regress/sql/drop_if_exists.sql @@ -89,3 +89,30 @@ DROP TABLE IF EXISTS test_exists; DROP TABLE test_exists; + +--- +--- role/user/group +--- + +CREATE USER tu1; +CREATE ROLE tr1; +CREATE GROUP tg1; + +DROP USER tu2; + +DROP USER IF EXISTS tu1, tu2; + +DROP USER tu1; + +DROP ROLE tr2; + +DROP ROLE IF EXISTS tr1, tr2; + +DROP ROLE tr1; + +DROP GROUP tg2; + +DROP GROUP IF EXISTS tg1, tg2; + +DROP GROUP tg1; + |