Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / test / regress / sql / drop.sql
blob2b143d95bc7180371ab1a08ad4f5ca3d7281db73
1 --
2 -- drop.source
3 --
5 --
6 -- this will fail if the user is not the postgres superuser.
7 -- if it does, don't worry about it (you can turn usersuper
8 -- back on as "postgres").  too many people don't follow 
9 -- directions and run this as "postgres", though...
11 UPDATE pg_user
12    SET usesuper = 't'::bool
13    WHERE usename = 'postgres';
17 -- FUNCTION REMOVAL
19 DROP FUNCTION hobbies(person);
21 DROP FUNCTION hobby_construct(text,text);
23 DROP FUNCTION equipment(hobbies_r);
25 DROP FUNCTION user_relns();
27 DROP FUNCTION widget_in(cstring);
29 DROP FUNCTION widget_out(widget);
31 DROP FUNCTION pt_in_widget(point,widget);
33 DROP FUNCTION overpaid(emp);
35 DROP FUNCTION boxarea(box);
37 DROP FUNCTION interpt_pp(path,path);
39 DROP FUNCTION reverse_name(name);
41 DROP FUNCTION oldstyle_length(int4, text);
44 -- OPERATOR REMOVAL
46 DROP OPERATOR ## (path, path);
48 DROP OPERATOR <% (point, widget);
50 -- left unary 
51 DROP OPERATOR @#@ (none, int4);
53 -- right unary 
54 DROP OPERATOR #@# (int4, none); 
56 -- right unary 
57 DROP OPERATOR #%# (int4, none); 
61 -- ABSTRACT DATA TYPE REMOVAL
63 DROP TYPE city_budget;
65 DROP TYPE widget;
69 -- RULE REMOVAL
70 --      (is also tested in queries.source)
74 -- AGGREGATE REMOVAL
76 DROP AGGREGATE newavg (int4);
78 DROP AGGREGATE newsum (int4);
80 DROP AGGREGATE newcnt (int4);
84 -- CLASS REMOVAL
85 --      (inheritance hierarchies are deleted in reverse order)
89 -- DROP ancillary data structures (i.e. indices)
91 DROP INDEX onek_unique1;
93 DROP INDEX onek_unique2;
95 DROP INDEX onek_hundred;
97 DROP INDEX onek_stringu1;
99 DROP INDEX tenk1_unique1;
101 DROP INDEX tenk1_unique2;
103 DROP INDEX tenk1_hundred;
105 DROP INDEX tenk2_unique1;
107 DROP INDEX tenk2_unique2;
109 DROP INDEX tenk2_hundred;
111 -- DROP INDEX onek2_u1_prtl;
113 -- DROP INDEX onek2_u2_prtl;
115 -- DROP INDEX onek2_stu1_prtl;
117 DROP INDEX rect2ind;
119 DROP INDEX rix;
121 DROP INDEX iix;
123 DROP INDEX six;
125 DROP INDEX hash_i4_index;
127 DROP INDEX hash_name_index;
129 DROP INDEX hash_txt_index;
131 DROP INDEX hash_f8_index;
133 -- DROP INDEX hash_ovfl_index;
135 DROP INDEX bt_i4_index;
137 DROP INDEX bt_name_index;
139 DROP INDEX bt_txt_index;
141 DROP INDEX bt_f8_index;
144 DROP TABLE  onek;
146 DROP TABLE  onek2;
148 DROP TABLE  tenk1;
150 DROP TABLE  tenk2;
152 DROP TABLE  Bprime;
155 DROP TABLE  hobbies_r;
157 DROP TABLE  equipment_r;
160 DROP TABLE  aggtest;
162 DROP TABLE  xacttest;
164 DROP TABLE  arrtest;
166 DROP TABLE  iportaltest;
169 DROP TABLE  f_star;
171 DROP TABLE  e_star;
173 DROP TABLE  d_star;
175 DROP TABLE  c_star;
177 DROP TABLE  b_star;
179 DROP TABLE  a_star;
183 -- must be in reverse inheritance order
185 DROP TABLE  stud_emp;
187 DROP TABLE  student;
189 DROP TABLE  slow_emp4000;
191 DROP TABLE  fast_emp4000;
193 DROP TABLE  emp;
195 DROP TABLE  person;
198 DROP TABLE  ramp;
200 DROP TABLE  real_city;
202 DROP TABLE  dept;
204 DROP TABLE  ihighway;
206 DROP TABLE  shighway;
208 DROP TABLE  road;
210 DROP TABLE  city;
213 DROP TABLE  hash_i4_heap;
215 DROP TABLE  hash_name_heap;
217 DROP TABLE  hash_txt_heap;
219 DROP TABLE  hash_f8_heap;
221 -- DROP TABLE  hash_ovfl_heap;
223 DROP TABLE  bt_i4_heap;
225 DROP TABLE  bt_name_heap;
227 DROP TABLE  bt_txt_heap;
229 DROP TABLE  bt_f8_heap;
232 DROP TABLE  ABSTIME_TBL;
234 DROP TABLE  RELTIME_TBL;
236 DROP TABLE  TINTERVAL_TBL;
239 -- VIRTUAL CLASS REMOVAL
240 --      (also tests removal of rewrite rules)
242 DROP VIEW street;
244 DROP VIEW iexit;
246 DROP VIEW toyemp;