Correct grammar in picksplit debug messages
[PostgreSQL.git] / src / test / regress / sql / drop_if_exists.sql
blobae7543fc4381f4c5def219f47f29f6af758c1987
1 -- 
2 -- IF EXISTS tests
3 -- 
5 -- table (will be really dropped at the end)
7 DROP TABLE test_exists;
9 DROP TABLE IF EXISTS test_exists;
11 CREATE TABLE test_exists (a int, b text);
13 -- view
15 DROP VIEW test_view_exists;
17 DROP VIEW IF EXISTS test_view_exists;
19 CREATE VIEW test_view_exists AS select * from test_exists;
21 DROP VIEW IF EXISTS test_view_exists;
23 DROP VIEW test_view_exists;
25 -- index
27 DROP INDEX test_index_exists;
29 DROP INDEX IF EXISTS test_index_exists;
31 CREATE INDEX test_index_exists on test_exists(a);
33 DROP INDEX IF EXISTS test_index_exists;
35 DROP INDEX test_index_exists;
37 -- sequence
39 DROP SEQUENCE test_sequence_exists;
41 DROP SEQUENCE IF EXISTS test_sequence_exists;
43 CREATE SEQUENCE test_sequence_exists;
45 DROP SEQUENCE IF EXISTS test_sequence_exists;
47 DROP SEQUENCE test_sequence_exists;
49 -- schema
51 DROP SCHEMA test_schema_exists;
53 DROP SCHEMA IF EXISTS test_schema_exists;
55 CREATE SCHEMA test_schema_exists;
57 DROP SCHEMA IF EXISTS test_schema_exists;
59 DROP SCHEMA test_schema_exists;
61 -- type
63 DROP TYPE test_type_exists;
65 DROP TYPE IF EXISTS test_type_exists;
67 CREATE type test_type_exists as (a int, b text);
69 DROP TYPE IF EXISTS test_type_exists;
71 DROP TYPE test_type_exists;
73 -- domain
75 DROP DOMAIN test_domain_exists;
77 DROP DOMAIN IF EXISTS test_domain_exists;
79 CREATE domain test_domain_exists as int not null check (value > 0);
81 DROP DOMAIN IF EXISTS test_domain_exists;
83 DROP DOMAIN test_domain_exists;
85 -- drop the table
88 DROP TABLE IF EXISTS test_exists;
90 DROP TABLE test_exists;
93 ---
94 --- role/user/group
95 ---
97 CREATE USER tu1;
98 CREATE ROLE tr1;
99 CREATE GROUP tg1;
101 DROP USER tu2;
103 DROP USER IF EXISTS tu1, tu2;
105 DROP USER tu1;
107 DROP ROLE tr2;
109 DROP ROLE IF EXISTS tr1, tr2;
111 DROP ROLE tr1;
113 DROP GROUP tg2;
115 DROP GROUP IF EXISTS tg1, tg2;
117 DROP GROUP tg1;