Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48fb696

Browse files
author
Neil Conway
committed
Fix a number of syntax errors in contrib modules' uninstall scripts.
Most of the changes add the mandatory USING clause to DROP OPERATORCLASS statements. DROP TYPE is now DROP TYPE CASCADE; withoutCASCADE a DROP TYPE fails due to the circular dependency on thetype's I/O functions. The DROP FUNCTION statements for the I/Ofunctions have been removed, as DROP TYPE CASCADE removes themautomatically. Patch from Michael Fuhr.
1 parent4a85bf3 commit48fb696

File tree

9 files changed

+56
-137
lines changed

9 files changed

+56
-137
lines changed

‎contrib/btree_gist/uninstall_btree_gist.sql

Lines changed: 27 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
SET search_path= public;
22

3-
DROPOPERATOR CLASS gist_cidr_ops;
3+
DROPOPERATOR CLASS gist_cidr_ops USING gist;
44

5-
DROPOPERATOR CLASS gist_inet_ops;
5+
DROPOPERATOR CLASS gist_inet_ops USING gist;
66

77
DROPFUNCTION gbt_inet_same(internal, internal, internal);
88

@@ -12,17 +12,13 @@ DROP FUNCTION gbt_inet_picksplit(internal, internal);
1212

1313
DROPFUNCTION gbt_inet_penalty(internal,internal,internal);
1414

15-
DROPFUNCTION gbt_cidr_compress(internal);
16-
1715
DROPFUNCTION gbt_inet_compress(internal);
1816

19-
DROPFUNCTION gbt_cidr_consistent(internal,cidr,int2);
20-
2117
DROPFUNCTION gbt_inet_consistent(internal,inet,int2);
2218

23-
DROPOPERATOR CLASS gist_vbit_ops;
19+
DROPOPERATOR CLASS gist_vbit_ops USING gist;
2420

25-
DROPOPERATOR CLASS gist_bit_ops;
21+
DROPOPERATOR CLASS gist_bit_ops USING gist;
2622

2723
DROPFUNCTION gbt_bit_same(internal, internal, internal);
2824

@@ -36,7 +32,7 @@ DROP FUNCTION gbt_bit_compress(internal);
3632

3733
DROPFUNCTION gbt_bit_consistent(internal,bit,int2);
3834

39-
DROPOPERATOR CLASS gist_numeric_ops;
35+
DROPOPERATOR CLASS gist_numeric_ops USING gist;
4036

4137
DROPFUNCTION gbt_numeric_same(internal, internal, internal);
4238

@@ -50,7 +46,7 @@ DROP FUNCTION gbt_numeric_compress(internal);
5046

5147
DROPFUNCTION gbt_numeric_consistent(internal,numeric,int2);
5248

53-
DROPOPERATOR CLASS gist_bytea_ops;
49+
DROPOPERATOR CLASS gist_bytea_ops USING gist;
5450

5551
DROPFUNCTION gbt_bytea_same(internal, internal, internal);
5652

@@ -64,9 +60,9 @@ DROP FUNCTION gbt_bytea_compress(internal);
6460

6561
DROPFUNCTION gbt_bytea_consistent(internal,bytea,int2);
6662

67-
DROPOPERATOR CLASS gist_bpchar_ops;
63+
DROPOPERATOR CLASS gist_bpchar_ops USING gist;
6864

69-
DROPOPERATOR CLASS gist_text_ops;
65+
DROPOPERATOR CLASS gist_text_ops USING gist;
7066

7167
DROPFUNCTION gbt_text_same(internal, internal, internal);
7268

@@ -84,7 +80,7 @@ DROP FUNCTION gbt_bpchar_consistent(internal,bpchar,int2);
8480

8581
DROPFUNCTION gbt_text_consistent(internal,text,int2);
8682

87-
DROPOPERATOR CLASS gist_macaddr_ops;
83+
DROPOPERATOR CLASS gist_macaddr_ops USING gist;
8884

8985
DROPFUNCTION gbt_macad_same(internal, internal, internal);
9086

@@ -98,7 +94,7 @@ DROP FUNCTION gbt_macad_compress(internal);
9894

9995
DROPFUNCTION gbt_macad_consistent(internal,macaddr,int2);
10096

101-
DROPOPERATOR CLASS gist_cash_ops;
97+
DROPOPERATOR CLASS gist_cash_ops USING gist;
10298

10399
DROPFUNCTION gbt_cash_same(internal, internal, internal);
104100

@@ -112,7 +108,7 @@ DROP FUNCTION gbt_cash_compress(internal);
112108

113109
DROPFUNCTION gbt_cash_consistent(internal,money,int2);
114110

115-
DROPOPERATOR CLASS gist_interval_ops;
111+
DROPOPERATOR CLASS gist_interval_ops USING gist;
116112

117113
DROPFUNCTION gbt_intv_same(internal, internal, internal);
118114

@@ -128,7 +124,7 @@ DROP FUNCTION gbt_intv_compress(internal);
128124

129125
DROPFUNCTION gbt_intv_consistent(internal,interval,int2);
130126

131-
DROPOPERATOR CLASS gist_date_ops;
127+
DROPOPERATOR CLASS gist_date_ops USING gist;
132128

133129
DROPFUNCTION gbt_date_same(internal, internal, internal);
134130

@@ -142,9 +138,9 @@ DROP FUNCTION gbt_date_compress(internal);
142138

143139
DROPFUNCTION gbt_date_consistent(internal,date,int2);
144140

145-
DROPOPERATOR CLASS gist_timetz_ops;
141+
DROPOPERATOR CLASS gist_timetz_ops USING gist;
146142

147-
DROPOPERATOR CLASS gist_time_ops;
143+
DROPOPERATOR CLASS gist_time_ops USING gist;
148144

149145
DROPFUNCTION gbt_time_same(internal, internal, internal);
150146

@@ -162,9 +158,9 @@ DROP FUNCTION gbt_timetz_consistent(internal,timetz,int2);
162158

163159
DROPFUNCTION gbt_time_consistent(internal,time,int2);
164160

165-
DROPOPERATOR CLASS gist_timestamptz_ops;
161+
DROPOPERATOR CLASS gist_timestamptz_ops USING gist;
166162

167-
DROPOPERATOR CLASS gist_timestamp_ops;
163+
DROPOPERATOR CLASS gist_timestamp_ops USING gist;
168164

169165
DROPFUNCTION gbt_ts_same(internal, internal, internal);
170166

@@ -182,7 +178,7 @@ DROP FUNCTION gbt_tstz_consistent(internal,timestamptz,int2);
182178

183179
DROPFUNCTION gbt_ts_consistent(internal,timestamp,int2);
184180

185-
DROPOPERATOR CLASS gist_float8_ops;
181+
DROPOPERATOR CLASS gist_float8_ops USING gist;
186182

187183
DROPFUNCTION gbt_float8_same(internal, internal, internal);
188184

@@ -196,7 +192,7 @@ DROP FUNCTION gbt_float8_compress(internal);
196192

197193
DROPFUNCTION gbt_float8_consistent(internal,float8,int2);
198194

199-
DROPOPERATOR CLASS gist_float4_ops;
195+
DROPOPERATOR CLASS gist_float4_ops USING gist;
200196

201197
DROPFUNCTION gbt_float4_same(internal, internal, internal);
202198

@@ -210,7 +206,7 @@ DROP FUNCTION gbt_float4_compress(internal);
210206

211207
DROPFUNCTION gbt_float4_consistent(internal,float4,int2);
212208

213-
DROPOPERATOR CLASS gist_int8_ops;
209+
DROPOPERATOR CLASS gist_int8_ops USING gist;
214210

215211
DROPFUNCTION gbt_int8_same(internal, internal, internal);
216212

@@ -224,7 +220,7 @@ DROP FUNCTION gbt_int8_compress(internal);
224220

225221
DROPFUNCTION gbt_int8_consistent(internal,int8,int2);
226222

227-
DROPOPERATOR CLASS gist_int4_ops;
223+
DROPOPERATOR CLASS gist_int4_ops USING gist;
228224

229225
DROPFUNCTION gbt_int4_same(internal, internal, internal);
230226

@@ -238,7 +234,7 @@ DROP FUNCTION gbt_int4_compress(internal);
238234

239235
DROPFUNCTION gbt_int4_consistent(internal,int4,int2);
240236

241-
DROPOPERATOR CLASS gist_int2_ops;
237+
DROPOPERATOR CLASS gist_int2_ops USING gist;
242238

243239
DROPFUNCTION gbt_int2_same(internal, internal, internal);
244240

@@ -252,7 +248,7 @@ DROP FUNCTION gbt_int2_compress(internal);
252248

253249
DROPFUNCTION gbt_int2_consistent(internal,int2,int2);
254250

255-
DROPOPERATOR CLASS gist_oid_ops;
251+
DROPOPERATOR CLASS gist_oid_ops USING gist;
256252

257253
DROPFUNCTION gbt_oid_same(internal, internal, internal);
258254

@@ -270,32 +266,12 @@ DROP FUNCTION gbt_oid_compress(internal);
270266

271267
DROPFUNCTION gbt_oid_consistent(internal,oid,int2);
272268

273-
DROPTYPE gbtreekey_var;
274-
275-
DROPFUNCTION gbtreekey_var_out(gbtreekey_var);
276-
277-
DROPFUNCTION gbtreekey_var_in(cstring);
278-
279-
DROPTYPE gbtreekey32;
280-
281-
DROPFUNCTION gbtreekey32_out(gbtreekey32);
282-
283-
DROPFUNCTION gbtreekey32_in(cstring);
284-
285-
DROPTYPE gbtreekey16;
286-
287-
DROPFUNCTION gbtreekey16_out(gbtreekey16);
288-
289-
DROPFUNCTION gbtreekey16_in(cstring);
290-
291-
DROPTYPE gbtreekey8;
292-
293-
DROPFUNCTION gbtreekey8_out(gbtreekey8);
269+
DROPTYPE gbtreekey_var CASCADE;
294270

295-
DROPFUNCTION gbtreekey8_in(cstring);
271+
DROPTYPE gbtreekey32 CASCADE;
296272

297-
DROPTYPEgbtreekey4;
273+
DROPTYPEgbtreekey16 CASCADE;
298274

299-
DROPFUNCTION gbtreekey4_out(gbtreekey4);
275+
DROPTYPE gbtreekey8 CASCADE;
300276

301-
DROPFUNCTION gbtreekey4_in(cstring);
277+
DROPTYPE gbtreekey4 CASCADE;

‎contrib/chkpass/uninstall_chkpass.sql

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
SET search_path= public;
22

3-
DROPOPERATOR<>; (
4-
leftarg= chkpass,
5-
rightarg=text,
6-
negator==,
7-
procedure= ne
8-
);
3+
DROPOPERATOR<>(chkpass,text);
94

10-
DROPOPERATOR=; (
11-
leftarg= chkpass,
12-
rightarg=text,
13-
commutator==,
14-
--negator = <>,
15-
procedure= eq
16-
);
5+
DROPOPERATOR=(chkpass,text);
6+
7+
DROPOPERATOR=(text, chkpass);
178

189
DROPFUNCTION ne(chkpass,text);
1910

2011
DROPFUNCTION eq(chkpass,text);
2112

2213
DROPFUNCTION raw(chkpass);
2314

24-
DROPTYPE chkpass;
25-
26-
DROPFUNCTION chkpass_out(chkpass);
27-
28-
DROPFUNCTION chkpass_in(cstring);
15+
DROPTYPE chkpass CASCADE;

‎contrib/cube/uninstall_cube.sql

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
SET search_path= public;
22

3-
DROPOPERATOR CLASS gist_cube_ops;
3+
DROPOPERATOR CLASS gist_cube_ops USING gist;
44

5-
DROPOPERATOR CLASS cube_ops;
5+
DROPOPERATOR CLASS cube_ops USING btree;
66

77
DROPFUNCTION g_cube_same(cube, cube, internal);
88

@@ -86,8 +86,4 @@ DROP CAST (text AS cube);
8686

8787
DROPFUNCTION cube(text);
8888

89-
DROPFUNCTION cube_out(cube);
90-
91-
DROPTYPE cube;
92-
93-
DROPFUNCTION cube_in(cstring);
89+
DROPTYPE cube CASCADE;

‎contrib/dblink/uninstall_dblink.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DROP FUNCTION dblink_build_sql_insert (text, int2vector, int4, _text, _text);
88

99
DROPFUNCTION dblink_get_pkey (text);
1010

11-
CREATETYPEdblink_pkey_resultsAS (position int4, colnametext);
11+
DROPTYPE dblink_pkey_results;
1212

1313
DROPFUNCTION dblink_exec (text,bool);
1414

‎contrib/intarray/uninstall__int.sql

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SET search_path= public;
22

3-
DROPOPERATOR CLASS gist__intbig_ops;
3+
DROPOPERATOR CLASS gist__intbig_ops USING gist;
44

55
DROPFUNCTION g_intbig_same(internal, internal, internal);
66

@@ -16,13 +16,9 @@ DROP FUNCTION g_intbig_compress(internal);
1616

1717
DROPFUNCTION g_intbig_consistent(internal,internal,int4);
1818

19-
DROPTYPE intbig_gkey;
19+
DROPTYPE intbig_gkey CASCADE;
2020

21-
DROPFUNCTION _intbig_out(intbig_gkey);
22-
23-
DROPFUNCTION _intbig_in(cstring);
24-
25-
DROPOPERATOR CLASS gist__int_ops;
21+
DROPOPERATOR CLASS gist__int_ops USING gist;
2622

2723
DROPFUNCTION g_int_same(_int4, _int4, internal);
2824

@@ -116,8 +112,4 @@ DROP FUNCTION boolop(_int4, query_int);
116112

117113
DROPFUNCTION querytree(query_int);
118114

119-
DROPTYPE query_int;
120-
121-
DROPFUNCTION bqarr_out(query_int);
122-
123-
DROPFUNCTION bqarr_in(cstring);
115+
DROPTYPE query_int CASCADE;

‎contrib/isbn_issn/uninstall_isbn_issn.sql

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SET search_path= public;
22

3-
DROPOPERATOR CLASS isbn_ops;
3+
DROPOPERATOR CLASS isbn_ops USING btree;
44

55
DROPFUNCTION isbn_cmp(isbn, isbn);
66

@@ -28,13 +28,9 @@ DROP FUNCTION isbn_le(isbn, isbn);
2828

2929
DROPFUNCTION isbn_lt(isbn, isbn);
3030

31-
DROPTYPE isbn;
31+
DROPTYPE isbn CASCADE;
3232

33-
DROPFUNCTION isbn_out(isbn);
34-
35-
DROPFUNCTION isbn_in(cstring);
36-
37-
DROPOPERATOR CLASS issn_ops;
33+
DROPOPERATOR CLASS issn_ops USING btree;
3834

3935
DROPFUNCTION issn_cmp(issn, issn);
4036

@@ -62,8 +58,4 @@ DROP FUNCTION issn_le(issn, issn);
6258

6359
DROPFUNCTION issn_lt(issn, issn);
6460

65-
DROPTYPE issn;
66-
67-
DROPFUNCTION issn_out(issn);
68-
69-
DROPFUNCTION issn_in(cstring);
61+
DROPTYPE issn CASCADE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp