OSDN Git Service

Fix a number of syntax errors in contrib modules' uninstall scripts.
authorNeil Conway <neilc@samurai.com>
Mon, 13 Mar 2006 18:04:58 +0000 (18:04 +0000)
committerNeil Conway <neilc@samurai.com>
Mon, 13 Mar 2006 18:04:58 +0000 (18:04 +0000)
Most of the changes add the mandatory USING clause to DROP OPERATOR
CLASS statements.  DROP TYPE is now DROP TYPE CASCADE; without
CASCADE a DROP TYPE fails due to the circular dependency on the
type's I/O functions.  The DROP FUNCTION statements for the I/O
functions have been removed, as DROP TYPE CASCADE removes them
automatically. Patch from Michael Fuhr.

contrib/btree_gist/uninstall_btree_gist.sql
contrib/chkpass/uninstall_chkpass.sql
contrib/cube/uninstall_cube.sql
contrib/dblink/uninstall_dblink.sql
contrib/intarray/uninstall__int.sql
contrib/isbn_issn/uninstall_isbn_issn.sql
contrib/ltree/uninstall_ltree.sql
contrib/pg_trgm/uninstall_pg_trgm.sql
contrib/seg/uninstall_seg.sql

index 87c5011..c884c16 100644 (file)
@@ -1,8 +1,8 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS gist_cidr_ops;
+DROP OPERATOR CLASS gist_cidr_ops USING gist;
 
-DROP OPERATOR CLASS gist_inet_ops;
+DROP OPERATOR CLASS gist_inet_ops USING gist;
 
 DROP FUNCTION gbt_inet_same(internal, internal, internal);
 
@@ -12,17 +12,13 @@ DROP FUNCTION gbt_inet_picksplit(internal, internal);
 
 DROP FUNCTION gbt_inet_penalty(internal,internal,internal);
 
-DROP FUNCTION gbt_cidr_compress(internal);
-
 DROP FUNCTION gbt_inet_compress(internal);
 
-DROP FUNCTION gbt_cidr_consistent(internal,cidr,int2);
-
 DROP FUNCTION gbt_inet_consistent(internal,inet,int2);
 
-DROP OPERATOR CLASS gist_vbit_ops;
+DROP OPERATOR CLASS gist_vbit_ops USING gist;
 
-DROP OPERATOR CLASS gist_bit_ops;
+DROP OPERATOR CLASS gist_bit_ops USING gist;
 
 DROP FUNCTION gbt_bit_same(internal, internal, internal);
 
@@ -36,7 +32,7 @@ DROP FUNCTION gbt_bit_compress(internal);
 
 DROP FUNCTION gbt_bit_consistent(internal,bit,int2);
 
-DROP OPERATOR CLASS gist_numeric_ops;
+DROP OPERATOR CLASS gist_numeric_ops USING gist;
 
 DROP FUNCTION gbt_numeric_same(internal, internal, internal);
 
@@ -50,7 +46,7 @@ DROP FUNCTION gbt_numeric_compress(internal);
 
 DROP FUNCTION gbt_numeric_consistent(internal,numeric,int2);
 
-DROP OPERATOR CLASS gist_bytea_ops;
+DROP OPERATOR CLASS gist_bytea_ops USING gist;
 
 DROP FUNCTION gbt_bytea_same(internal, internal, internal);
 
@@ -64,9 +60,9 @@ DROP FUNCTION gbt_bytea_compress(internal);
 
 DROP FUNCTION gbt_bytea_consistent(internal,bytea,int2);
 
-DROP OPERATOR CLASS gist_bpchar_ops;
+DROP OPERATOR CLASS gist_bpchar_ops USING gist;
 
-DROP OPERATOR CLASS gist_text_ops;
+DROP OPERATOR CLASS gist_text_ops USING gist;
 
 DROP FUNCTION gbt_text_same(internal, internal, internal);
 
@@ -84,7 +80,7 @@ DROP FUNCTION gbt_bpchar_consistent(internal,bpchar,int2);
 
 DROP FUNCTION gbt_text_consistent(internal,text,int2);
 
-DROP OPERATOR CLASS gist_macaddr_ops;
+DROP OPERATOR CLASS gist_macaddr_ops USING gist;
 
 DROP FUNCTION gbt_macad_same(internal, internal, internal);
 
@@ -98,7 +94,7 @@ DROP FUNCTION gbt_macad_compress(internal);
 
 DROP FUNCTION gbt_macad_consistent(internal,macaddr,int2);
 
-DROP OPERATOR CLASS gist_cash_ops;
+DROP OPERATOR CLASS gist_cash_ops USING gist;
 
 DROP FUNCTION gbt_cash_same(internal, internal, internal);
 
@@ -112,7 +108,7 @@ DROP FUNCTION gbt_cash_compress(internal);
 
 DROP FUNCTION gbt_cash_consistent(internal,money,int2);
 
-DROP OPERATOR CLASS gist_interval_ops;
+DROP OPERATOR CLASS gist_interval_ops USING gist;
 
 DROP FUNCTION gbt_intv_same(internal, internal, internal);
 
@@ -128,7 +124,7 @@ DROP FUNCTION gbt_intv_compress(internal);
 
 DROP FUNCTION gbt_intv_consistent(internal,interval,int2);
 
-DROP OPERATOR CLASS gist_date_ops;
+DROP OPERATOR CLASS gist_date_ops USING gist;
 
 DROP FUNCTION gbt_date_same(internal, internal, internal);
 
@@ -142,9 +138,9 @@ DROP FUNCTION gbt_date_compress(internal);
 
 DROP FUNCTION gbt_date_consistent(internal,date,int2);
 
-DROP OPERATOR CLASS gist_timetz_ops;
+DROP OPERATOR CLASS gist_timetz_ops USING gist;
 
-DROP OPERATOR CLASS gist_time_ops;
+DROP OPERATOR CLASS gist_time_ops USING gist;
 
 DROP FUNCTION gbt_time_same(internal, internal, internal);
 
@@ -162,9 +158,9 @@ DROP FUNCTION gbt_timetz_consistent(internal,timetz,int2);
 
 DROP FUNCTION gbt_time_consistent(internal,time,int2);
 
-DROP OPERATOR CLASS gist_timestamptz_ops;
+DROP OPERATOR CLASS gist_timestamptz_ops USING gist;
 
-DROP OPERATOR CLASS gist_timestamp_ops;
+DROP OPERATOR CLASS gist_timestamp_ops USING gist;
 
 DROP FUNCTION gbt_ts_same(internal, internal, internal);
 
@@ -182,7 +178,7 @@ DROP FUNCTION gbt_tstz_consistent(internal,timestamptz,int2);
 
 DROP FUNCTION gbt_ts_consistent(internal,timestamp,int2);
 
-DROP OPERATOR CLASS gist_float8_ops;
+DROP OPERATOR CLASS gist_float8_ops USING gist;
 
 DROP FUNCTION gbt_float8_same(internal, internal, internal);
 
@@ -196,7 +192,7 @@ DROP FUNCTION gbt_float8_compress(internal);
 
 DROP FUNCTION gbt_float8_consistent(internal,float8,int2);
 
-DROP OPERATOR CLASS gist_float4_ops;
+DROP OPERATOR CLASS gist_float4_ops USING gist;
 
 DROP FUNCTION gbt_float4_same(internal, internal, internal);
 
@@ -210,7 +206,7 @@ DROP FUNCTION gbt_float4_compress(internal);
 
 DROP FUNCTION gbt_float4_consistent(internal,float4,int2);
 
-DROP OPERATOR CLASS gist_int8_ops;
+DROP OPERATOR CLASS gist_int8_ops USING gist;
 
 DROP FUNCTION gbt_int8_same(internal, internal, internal);
 
@@ -224,7 +220,7 @@ DROP FUNCTION gbt_int8_compress(internal);
 
 DROP FUNCTION gbt_int8_consistent(internal,int8,int2);
 
-DROP OPERATOR CLASS gist_int4_ops;
+DROP OPERATOR CLASS gist_int4_ops USING gist;
 
 DROP FUNCTION gbt_int4_same(internal, internal, internal);
 
@@ -238,7 +234,7 @@ DROP FUNCTION gbt_int4_compress(internal);
 
 DROP FUNCTION gbt_int4_consistent(internal,int4,int2);
 
-DROP OPERATOR CLASS gist_int2_ops;
+DROP OPERATOR CLASS gist_int2_ops USING gist;
 
 DROP FUNCTION gbt_int2_same(internal, internal, internal);
 
@@ -252,7 +248,7 @@ DROP FUNCTION gbt_int2_compress(internal);
 
 DROP FUNCTION gbt_int2_consistent(internal,int2,int2);
 
-DROP OPERATOR CLASS gist_oid_ops;
+DROP OPERATOR CLASS gist_oid_ops USING gist;
 
 DROP FUNCTION gbt_oid_same(internal, internal, internal);
 
@@ -270,32 +266,12 @@ DROP FUNCTION gbt_oid_compress(internal);
 
 DROP FUNCTION gbt_oid_consistent(internal,oid,int2);
 
-DROP TYPE gbtreekey_var;
-
-DROP FUNCTION gbtreekey_var_out(gbtreekey_var);
-
-DROP FUNCTION gbtreekey_var_in(cstring);
-
-DROP TYPE gbtreekey32;
-
-DROP FUNCTION gbtreekey32_out(gbtreekey32);
-
-DROP FUNCTION gbtreekey32_in(cstring);
-
-DROP TYPE gbtreekey16;
-
-DROP FUNCTION gbtreekey16_out(gbtreekey16);
-
-DROP FUNCTION gbtreekey16_in(cstring);
-
-DROP TYPE gbtreekey8;
-
-DROP FUNCTION gbtreekey8_out(gbtreekey8);
+DROP TYPE gbtreekey_var CASCADE;
 
-DROP FUNCTION gbtreekey8_in(cstring);
+DROP TYPE gbtreekey32 CASCADE;
 
-DROP TYPE gbtreekey4;
+DROP TYPE gbtreekey16 CASCADE;
 
-DROP FUNCTION gbtreekey4_out(gbtreekey4);
+DROP TYPE gbtreekey8 CASCADE;
 
-DROP FUNCTION gbtreekey4_in(cstring);
+DROP TYPE gbtreekey4 CASCADE;
index f1f8574..4a4737a 100644 (file)
@@ -1,19 +1,10 @@
 SET search_path = public;
 
-DROP OPERATOR <>; (
-       leftarg = chkpass,
-       rightarg = text,
-       negator = =,
-       procedure = ne
-);
+DROP OPERATOR <>(chkpass, text);
 
-DROP OPERATOR =; (
-       leftarg = chkpass,
-       rightarg = text,
-       commutator = =,
---     negator = <>,
-       procedure = eq
-);
+DROP OPERATOR =(chkpass, text);
+
+DROP OPERATOR =(text, chkpass);
 
 DROP FUNCTION ne(chkpass, text);
 
@@ -21,8 +12,4 @@ DROP FUNCTION eq(chkpass, text);
 
 DROP FUNCTION raw(chkpass);
 
-DROP TYPE chkpass;
-
-DROP FUNCTION chkpass_out(chkpass);
-
-DROP FUNCTION chkpass_in(cstring);
+DROP TYPE chkpass CASCADE;
index a6a1777..6ae8ee1 100644 (file)
@@ -1,8 +1,8 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS gist_cube_ops;
+DROP OPERATOR CLASS gist_cube_ops USING gist;
 
-DROP OPERATOR CLASS cube_ops;
+DROP OPERATOR CLASS cube_ops USING btree;
 
 DROP FUNCTION g_cube_same(cube, cube, internal);
 
@@ -86,8 +86,4 @@ DROP CAST (text AS cube);
 
 DROP FUNCTION cube(text);
 
-DROP FUNCTION cube_out(cube);
-
-DROP TYPE cube;
-
-DROP FUNCTION cube_in(cstring);
+DROP TYPE cube CASCADE;
index 4ef8e08..6a8bda9 100644 (file)
@@ -8,7 +8,7 @@ DROP FUNCTION dblink_build_sql_insert (text, int2vector, int4, _text, _text);
 
 DROP FUNCTION dblink_get_pkey (text);
 
-CREATE TYPE dblink_pkey_results AS (position int4, colname text);
+DROP TYPE dblink_pkey_results;
 
 DROP FUNCTION dblink_exec (text,bool);
 
index 92dc92a..43fd854 100644 (file)
@@ -1,6 +1,6 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS gist__intbig_ops;
+DROP OPERATOR CLASS gist__intbig_ops USING gist;
 
 DROP FUNCTION g_intbig_same(internal, internal, internal);
 
@@ -16,13 +16,9 @@ DROP FUNCTION g_intbig_compress(internal);
 
 DROP FUNCTION g_intbig_consistent(internal,internal,int4);
 
-DROP TYPE intbig_gkey;
+DROP TYPE intbig_gkey CASCADE;
 
-DROP FUNCTION _intbig_out(intbig_gkey);
-
-DROP FUNCTION _intbig_in(cstring);
-
-DROP OPERATOR CLASS gist__int_ops;
+DROP OPERATOR CLASS gist__int_ops USING gist;
 
 DROP FUNCTION g_int_same(_int4, _int4, internal);
 
@@ -116,8 +112,4 @@ DROP FUNCTION boolop(_int4, query_int);
 
 DROP FUNCTION querytree(query_int);
 
-DROP TYPE query_int;
-
-DROP FUNCTION bqarr_out(query_int);
-
-DROP FUNCTION bqarr_in(cstring);
+DROP TYPE query_int CASCADE;
index d6356e1..07a26f3 100644 (file)
@@ -1,6 +1,6 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS isbn_ops;
+DROP OPERATOR CLASS isbn_ops USING btree;
 
 DROP FUNCTION isbn_cmp(isbn, isbn);
 
@@ -28,13 +28,9 @@ DROP FUNCTION isbn_le(isbn, isbn);
 
 DROP FUNCTION isbn_lt(isbn, isbn);
 
-DROP TYPE isbn;
+DROP TYPE isbn CASCADE;
 
-DROP FUNCTION isbn_out(isbn);
-
-DROP FUNCTION isbn_in(cstring);
-
-DROP OPERATOR CLASS issn_ops;
+DROP OPERATOR CLASS issn_ops USING btree;
 
 DROP FUNCTION issn_cmp(issn, issn);
 
@@ -62,8 +58,4 @@ DROP FUNCTION issn_le(issn, issn);
 
 DROP FUNCTION issn_lt(issn, issn);
 
-DROP TYPE issn;
-
-DROP FUNCTION issn_out(issn);
-
-DROP FUNCTION issn_in(cstring);
+DROP TYPE issn CASCADE;
index f9977cd..316477c 100644 (file)
@@ -1,6 +1,6 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS gist__ltree_ops;
+DROP OPERATOR CLASS gist__ltree_ops USING gist;
 
 DROP FUNCTION _ltree_same(internal, internal, internal);
 
@@ -90,7 +90,7 @@ DROP FUNCTION _ltree_r_isparent(ltree,_ltree);
 
 DROP FUNCTION _ltree_isparent(_ltree,ltree);
 
-DROP OPERATOR CLASS gist_ltree_ops;
+DROP OPERATOR CLASS gist_ltree_ops USING gist;
 
 DROP FUNCTION ltree_same(internal, internal, internal);
 
@@ -106,12 +106,8 @@ DROP FUNCTION ltree_compress(internal);
 
 DROP FUNCTION ltree_consistent(internal,internal,int2);
 
-DROP TYPE ltree_gist;   
+DROP TYPE ltree_gist CASCADE;
   
-DROP FUNCTION ltree_gist_out(ltree_gist);
-  
-DROP FUNCTION ltree_gist_in(cstring);
-
 DROP OPERATOR ^@ (ltxtquery, ltree);
 
 DROP OPERATOR ^@ (ltree, ltxtquery);
@@ -124,11 +120,7 @@ DROP FUNCTION ltxtq_rexec(ltxtquery, ltree);
 
 DROP FUNCTION ltxtq_exec(ltree, ltxtquery);
 
-DROP TYPE ltxtquery;
-
-DROP FUNCTION ltxtq_out(ltxtquery);
-
-DROP FUNCTION ltxtq_in(cstring);
+DROP TYPE ltxtquery CASCADE;
 
 DROP OPERATOR ^? (_lquery, ltree);
 
@@ -154,13 +146,9 @@ DROP FUNCTION ltq_rregex(lquery,ltree);
 
 DROP FUNCTION ltq_regex(ltree,lquery);
 
-DROP TYPE lquery;
+DROP TYPE lquery CASCADE;
 
-DROP FUNCTION lquery_out(lquery);
-
-DROP FUNCTION lquery_in(cstring);
-
-DROP OPERATOR CLASS ltree_ops;
+DROP OPERATOR CLASS ltree_ops USING btree;
 
 DROP OPERATOR || (text, ltree);
 
@@ -244,8 +232,4 @@ DROP FUNCTION ltree_lt(ltree,ltree);
 
 DROP FUNCTION ltree_cmp(ltree,ltree);
 
-DROP TYPE ltree;
-
-DROP FUNCTION ltree_out(ltree);
-
-DROP FUNCTION ltree_in(cstring);
+DROP TYPE ltree CASCADE;
index 1804078..8fc85bd 100644 (file)
@@ -2,7 +2,7 @@ SET search_path = public;
 
 BEGIN;
 
-DROP OPERATOR CLASS gist_trgm_ops;
+DROP OPERATOR CLASS gist_trgm_ops USING gist;
 
 DROP FUNCTION gtrgm_same(gtrgm, gtrgm, internal);
 
@@ -18,11 +18,7 @@ DROP FUNCTION gtrgm_compress(internal);
  
 DROP FUNCTION gtrgm_consistent(gtrgm,internal,int4);
 
-DROP TYPE gtrgm;
-
-DROP FUNCTION gtrgm_out(gtrgm);
-
-DROP FUNCTION gtrgm_in(cstring);
+DROP TYPE gtrgm CASCADE;
 
 DROP OPERATOR % (text, text);
 
index 50e7d24..21ffdfd 100644 (file)
@@ -1,8 +1,8 @@
 SET search_path = public;
 
-DROP OPERATOR CLASS gist_seg_ops;
+DROP OPERATOR CLASS gist_seg_ops USING gist;
 
-DROP OPERATOR CLASS seg_ops;
+DROP OPERATOR CLASS seg_ops USING btree;
 
 DROP FUNCTION gseg_same(seg, seg, internal);
 
@@ -82,8 +82,4 @@ DROP FUNCTION seg_over_right(seg, seg);
 
 DROP FUNCTION seg_over_left(seg, seg);
 
-DROP TYPE seg;
-
-DROP FUNCTION seg_out(seg);
-
-DROP FUNCTION seg_in(cstring);
+DROP TYPE seg CASCADE;