diff --git a/contrib/btree_gist/Makefile b/contrib/btree_gist/Makefile
index ba4af14..fb4393c 100644
--- a/contrib/btree_gist/Makefile
+++ b/contrib/btree_gist/Makefile
@@ -5,14 +5,15 @@ MODULE_big = btree_gist
 OBJS =  btree_gist.o btree_utils_num.o btree_utils_var.o btree_int2.o \
         btree_int4.o btree_int8.o btree_float4.o btree_float8.o btree_cash.o \
         btree_oid.o btree_ts.o btree_time.o btree_date.o btree_interval.o \
-        btree_macaddr.o btree_inet.o btree_text.o btree_bytea.o btree_bit.o \
+        btree_macaddr.o btree_text.o btree_bytea.o btree_bit.o \
         btree_numeric.o
 
 EXTENSION = btree_gist
-DATA = btree_gist--1.0.sql btree_gist--unpackaged--1.0.sql
+DATA = btree_gist--1.1.sql btree_gist--unpackaged--1.0.sql \
+		btree_gist--1.0--1.1.sql
 
 REGRESS = init int2 int4 int8 float4 float8 cash oid timestamp timestamptz \
-        time timetz date interval macaddr inet cidr text varchar char bytea \
+        time timetz date interval macaddr text varchar char bytea \
         bit varbit numeric not_equal
 
 SHLIB_LINK += $(filter -lm, $(LIBS))
diff --git a/contrib/btree_gist/btree_gist--1.0--1.1.sql b/contrib/btree_gist/btree_gist--1.0--1.1.sql
new file mode 100644
index 0000000..ccc2ad1
--- /dev/null
+++ b/contrib/btree_gist/btree_gist--1.0--1.1.sql
@@ -0,0 +1,8 @@
+/* contrib/btree_gist/btree_gist--1.0--1.1.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "ALTER EXTENSION btree_gist UPDATE TO 1.1" to load this file. \quit
+
+DROP OPERATOR FAMILY gist_inet_ops USING gist;
+
+DROP OPERATOR FAMILY gist_cidr_ops USING gist;
diff --git a/contrib/btree_gist/btree_gist--1.0.sql b/contrib/btree_gist/btree_gist--1.0.sql
deleted file mode 100644
index c5c9587..0000000
--- a/contrib/btree_gist/btree_gist--1.0.sql
+++ /dev/null
@@ -1,1491 +0,0 @@
-/* contrib/btree_gist/btree_gist--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION btree_gist" to load this file. \quit
-
-CREATE FUNCTION gbtreekey4_in(cstring)
-RETURNS gbtreekey4
-AS 'MODULE_PATHNAME', 'gbtreekey_in'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbtreekey4_out(gbtreekey4)
-RETURNS cstring
-AS 'MODULE_PATHNAME', 'gbtreekey_out'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE TYPE gbtreekey4 (
-	INTERNALLENGTH = 4,
-	INPUT  = gbtreekey4_in,
-	OUTPUT = gbtreekey4_out
-);
-
-CREATE FUNCTION gbtreekey8_in(cstring)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME', 'gbtreekey_in'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbtreekey8_out(gbtreekey8)
-RETURNS cstring
-AS 'MODULE_PATHNAME', 'gbtreekey_out'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE TYPE gbtreekey8 (
-	INTERNALLENGTH = 8,
-	INPUT  = gbtreekey8_in,
-	OUTPUT = gbtreekey8_out
-);
-
-CREATE FUNCTION gbtreekey16_in(cstring)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME', 'gbtreekey_in'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbtreekey16_out(gbtreekey16)
-RETURNS cstring
-AS 'MODULE_PATHNAME', 'gbtreekey_out'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE TYPE gbtreekey16 (
-	INTERNALLENGTH = 16,
-	INPUT  = gbtreekey16_in,
-	OUTPUT = gbtreekey16_out
-);
-
-CREATE FUNCTION gbtreekey32_in(cstring)
-RETURNS gbtreekey32
-AS 'MODULE_PATHNAME', 'gbtreekey_in'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbtreekey32_out(gbtreekey32)
-RETURNS cstring
-AS 'MODULE_PATHNAME', 'gbtreekey_out'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE TYPE gbtreekey32 (
-	INTERNALLENGTH = 32,
-	INPUT  = gbtreekey32_in,
-	OUTPUT = gbtreekey32_out
-);
-
-CREATE FUNCTION gbtreekey_var_in(cstring)
-RETURNS gbtreekey_var
-AS 'MODULE_PATHNAME', 'gbtreekey_in'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbtreekey_var_out(gbtreekey_var)
-RETURNS cstring
-AS 'MODULE_PATHNAME', 'gbtreekey_out'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE TYPE gbtreekey_var (
-	INTERNALLENGTH = VARIABLE,
-	INPUT  = gbtreekey_var_in,
-	OUTPUT = gbtreekey_var_out,
-	STORAGE = EXTENDED
-);
-
---distance operators
-
-CREATE FUNCTION cash_dist(money, money)
-RETURNS money
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = money,
-	RIGHTARG = money,
-	PROCEDURE = cash_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION date_dist(date, date)
-RETURNS int4
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = date,
-	RIGHTARG = date,
-	PROCEDURE = date_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION float4_dist(float4, float4)
-RETURNS float4
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = float4,
-	RIGHTARG = float4,
-	PROCEDURE = float4_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION float8_dist(float8, float8)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = float8,
-	RIGHTARG = float8,
-	PROCEDURE = float8_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION int2_dist(int2, int2)
-RETURNS int2
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = int2,
-	RIGHTARG = int2,
-	PROCEDURE = int2_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION int4_dist(int4, int4)
-RETURNS int4
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = int4,
-	RIGHTARG = int4,
-	PROCEDURE = int4_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION int8_dist(int8, int8)
-RETURNS int8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = int8,
-	RIGHTARG = int8,
-	PROCEDURE = int8_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION interval_dist(interval, interval)
-RETURNS interval
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = interval,
-	RIGHTARG = interval,
-	PROCEDURE = interval_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION oid_dist(oid, oid)
-RETURNS oid
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = oid,
-	RIGHTARG = oid,
-	PROCEDURE = oid_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION time_dist(time, time)
-RETURNS interval
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = time,
-	RIGHTARG = time,
-	PROCEDURE = time_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION ts_dist(timestamp, timestamp)
-RETURNS interval
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = timestamp,
-	RIGHTARG = timestamp,
-	PROCEDURE = ts_dist,
-	COMMUTATOR = '<->'
-);
-
-CREATE FUNCTION tstz_dist(timestamptz, timestamptz)
-RETURNS interval
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE OPERATOR <-> (
-	LEFTARG = timestamptz,
-	RIGHTARG = timestamptz,
-	PROCEDURE = tstz_dist,
-	COMMUTATOR = '<->'
-);
-
-
---
---
---
--- oid ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_oid_consistent(internal,oid,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_distance(internal,oid,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_decompress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_var_decompress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_union(bytea, internal)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_oid_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_oid_ops
-DEFAULT FOR TYPE oid USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_oid_consistent (internal, oid, int2, oid, internal),
-	FUNCTION	2	gbt_oid_union (bytea, internal),
-	FUNCTION	3	gbt_oid_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_oid_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_oid_picksplit (internal, internal),
-	FUNCTION	7	gbt_oid_same (internal, internal, internal),
-	STORAGE		gbtreekey8;
-
--- Add operators that are new in 9.1.  We do it like this, leaving them
--- "loose" in the operator family rather than bound into the opclass, because
--- that's the only state that can be reproduced during an upgrade from 9.0.
-
-ALTER OPERATOR FAMILY gist_oid_ops USING gist ADD
-	OPERATOR	6	<> (oid, oid) ,
-	OPERATOR	15	<-> (oid, oid) FOR ORDER BY pg_catalog.oid_ops ,
-	FUNCTION	8 (oid, oid) gbt_oid_distance (internal, oid, int2, oid) ;
-
-
---
---
---
--- int2 ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_int2_consistent(internal,int2,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_distance(internal,int2,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_union(bytea, internal)
-RETURNS gbtreekey4
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int2_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_int2_ops
-DEFAULT FOR TYPE int2 USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_int2_consistent (internal, int2, int2, oid, internal),
-	FUNCTION	2	gbt_int2_union (bytea, internal),
-	FUNCTION	3	gbt_int2_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_int2_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_int2_picksplit (internal, internal),
-	FUNCTION	7	gbt_int2_same (internal, internal, internal),
-	STORAGE		gbtreekey4;
-
-ALTER OPERATOR FAMILY gist_int2_ops USING gist ADD
-	OPERATOR	6	<> (int2, int2) ,
-	OPERATOR	15	<-> (int2, int2) FOR ORDER BY pg_catalog.integer_ops ,
-	FUNCTION	8 (int2, int2) gbt_int2_distance (internal, int2, int2, oid) ;
-
-
---
---
---
--- int4 ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_int4_consistent(internal,int4,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_distance(internal,int4,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_union(bytea, internal)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int4_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_int4_ops
-DEFAULT FOR TYPE int4 USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_int4_consistent (internal, int4, int2, oid, internal),
-	FUNCTION	2	gbt_int4_union (bytea, internal),
-	FUNCTION	3	gbt_int4_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_int4_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_int4_picksplit (internal, internal),
-	FUNCTION	7	gbt_int4_same (internal, internal, internal),
-	STORAGE		gbtreekey8;
-
-ALTER OPERATOR FAMILY gist_int4_ops USING gist ADD
-	OPERATOR	6	<> (int4, int4) ,
-	OPERATOR	15	<-> (int4, int4) FOR ORDER BY pg_catalog.integer_ops ,
-	FUNCTION	8 (int4, int4) gbt_int4_distance (internal, int4, int2, oid) ;
-
-
---
---
---
--- int8 ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_int8_consistent(internal,int8,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_distance(internal,int8,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_int8_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_int8_ops
-DEFAULT FOR TYPE int8 USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_int8_consistent (internal, int8, int2, oid, internal),
-	FUNCTION	2	gbt_int8_union (bytea, internal),
-	FUNCTION	3	gbt_int8_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_int8_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_int8_picksplit (internal, internal),
-	FUNCTION	7	gbt_int8_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_int8_ops USING gist ADD
-	OPERATOR	6	<> (int8, int8) ,
-	OPERATOR	15	<-> (int8, int8) FOR ORDER BY pg_catalog.integer_ops ,
-	FUNCTION	8 (int8, int8) gbt_int8_distance (internal, int8, int2, oid) ;
-
-
---
---
---
--- float4 ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_float4_consistent(internal,float4,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_distance(internal,float4,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_union(bytea, internal)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float4_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_float4_ops
-DEFAULT FOR TYPE float4 USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_float4_consistent (internal, float4, int2, oid, internal),
-	FUNCTION	2	gbt_float4_union (bytea, internal),
-	FUNCTION	3	gbt_float4_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_float4_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_float4_picksplit (internal, internal),
-	FUNCTION	7	gbt_float4_same (internal, internal, internal),
-	STORAGE		gbtreekey8;
-
-ALTER OPERATOR FAMILY gist_float4_ops USING gist ADD
-	OPERATOR	6	<> (float4, float4) ,
-	OPERATOR	15	<-> (float4, float4) FOR ORDER BY pg_catalog.float_ops ,
-	FUNCTION	8 (float4, float4) gbt_float4_distance (internal, float4, int2, oid) ;
-
-
---
---
---
--- float8 ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_float8_consistent(internal,float8,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_distance(internal,float8,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_float8_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_float8_ops
-DEFAULT FOR TYPE float8 USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_float8_consistent (internal, float8, int2, oid, internal),
-	FUNCTION	2	gbt_float8_union (bytea, internal),
-	FUNCTION	3	gbt_float8_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_float8_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_float8_picksplit (internal, internal),
-	FUNCTION	7	gbt_float8_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_float8_ops USING gist ADD
-	OPERATOR	6	<> (float8, float8) ,
-	OPERATOR	15	<-> (float8, float8) FOR ORDER BY pg_catalog.float_ops ,
-	FUNCTION	8 (float8, float8) gbt_float8_distance (internal, float8, int2, oid) ;
-
-
---
---
---
--- timestamp ops
---
---
---
-
-CREATE FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_distance(internal,timestamp,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_tstz_distance(internal,timestamptz,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_tstz_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_ts_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_timestamp_ops
-DEFAULT FOR TYPE timestamp USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_ts_consistent (internal, timestamp, int2, oid, internal),
-	FUNCTION	2	gbt_ts_union (bytea, internal),
-	FUNCTION	3	gbt_ts_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_ts_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_ts_picksplit (internal, internal),
-	FUNCTION	7	gbt_ts_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_timestamp_ops USING gist ADD
-	OPERATOR	6	<> (timestamp, timestamp) ,
-	OPERATOR	15	<-> (timestamp, timestamp) FOR ORDER BY pg_catalog.interval_ops ,
-	FUNCTION	8 (timestamp, timestamp) gbt_ts_distance (internal, timestamp, int2, oid) ;
-
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_timestamptz_ops
-DEFAULT FOR TYPE timestamptz USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_tstz_consistent (internal, timestamptz, int2, oid, internal),
-	FUNCTION	2	gbt_ts_union (bytea, internal),
-	FUNCTION	3	gbt_tstz_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_ts_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_ts_picksplit (internal, internal),
-	FUNCTION	7	gbt_ts_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_timestamptz_ops USING gist ADD
-	OPERATOR	6	<> (timestamptz, timestamptz) ,
-	OPERATOR	15	<-> (timestamptz, timestamptz) FOR ORDER BY pg_catalog.interval_ops ,
-	FUNCTION	8 (timestamptz, timestamptz) gbt_tstz_distance (internal, timestamptz, int2, oid) ;
-
-
---
---
---
--- time ops
---
---
---
-
-CREATE FUNCTION gbt_time_consistent(internal,time,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_distance(internal,time,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_timetz_consistent(internal,timetz,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_timetz_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_time_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_time_ops
-DEFAULT FOR TYPE time USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_time_consistent (internal, time, int2, oid, internal),
-	FUNCTION	2	gbt_time_union (bytea, internal),
-	FUNCTION	3	gbt_time_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_time_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_time_picksplit (internal, internal),
-	FUNCTION	7	gbt_time_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_time_ops USING gist ADD
-	OPERATOR	6	<> (time, time) ,
-	OPERATOR	15	<-> (time, time) FOR ORDER BY pg_catalog.interval_ops ,
-	FUNCTION	8 (time, time) gbt_time_distance (internal, time, int2, oid) ;
-
-
-CREATE OPERATOR CLASS gist_timetz_ops
-DEFAULT FOR TYPE timetz USING gist
-AS
-	OPERATOR	1	<   ,
-	OPERATOR	2	<=  ,
-	OPERATOR	3	=   ,
-	OPERATOR	4	>=  ,
-	OPERATOR	5	>   ,
-	FUNCTION	1	gbt_timetz_consistent (internal, timetz, int2, oid, internal),
-	FUNCTION	2	gbt_time_union (bytea, internal),
-	FUNCTION	3	gbt_timetz_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_time_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_time_picksplit (internal, internal),
-	FUNCTION	7	gbt_time_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_timetz_ops USING gist ADD
-	OPERATOR	6	<> (timetz, timetz) ;
-
-
---
---
---
--- date ops
---
---
---
-
-CREATE FUNCTION gbt_date_consistent(internal,date,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_distance(internal,date,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_union(bytea, internal)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_date_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_date_ops
-DEFAULT FOR TYPE date USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_date_consistent (internal, date, int2, oid, internal),
-	FUNCTION	2	gbt_date_union (bytea, internal),
-	FUNCTION	3	gbt_date_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_date_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_date_picksplit (internal, internal),
-	FUNCTION	7	gbt_date_same (internal, internal, internal),
-	STORAGE		gbtreekey8;
-
-ALTER OPERATOR FAMILY gist_date_ops USING gist ADD
-	OPERATOR	6	<> (date, date) ,
-	OPERATOR	15	<-> (date, date) FOR ORDER BY pg_catalog.integer_ops ,
-	FUNCTION	8 (date, date) gbt_date_distance (internal, date, int2, oid) ;
-
-
---
---
---
--- interval ops
---
---
---
-
-CREATE FUNCTION gbt_intv_consistent(internal,interval,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_distance(internal,interval,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_decompress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_union(bytea, internal)
-RETURNS gbtreekey32
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_intv_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_interval_ops
-DEFAULT FOR TYPE interval USING gist
-AS
-	OPERATOR	1	< ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	= ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	> ,
-	FUNCTION	1	gbt_intv_consistent (internal, interval, int2, oid, internal),
-	FUNCTION	2	gbt_intv_union (bytea, internal),
-	FUNCTION	3	gbt_intv_compress (internal),
-	FUNCTION	4	gbt_intv_decompress (internal),
-	FUNCTION	5	gbt_intv_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_intv_picksplit (internal, internal),
-	FUNCTION	7	gbt_intv_same (internal, internal, internal),
-	STORAGE		gbtreekey32;
-
-ALTER OPERATOR FAMILY gist_interval_ops USING gist ADD
-	OPERATOR	6	<> (interval, interval) ,
-	OPERATOR	15	<-> (interval, interval) FOR ORDER BY pg_catalog.interval_ops ,
-	FUNCTION	8 (interval, interval) gbt_intv_distance (internal, interval, int2, oid) ;
-
-
---
---
---
--- cash ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_cash_consistent(internal,money,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_distance(internal,money,int2,oid)
-RETURNS float8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_union(bytea, internal)
-RETURNS gbtreekey8
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_cash_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_cash_ops
-DEFAULT FOR TYPE money USING gist
-AS
-	OPERATOR	1	< ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	= ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	> ,
-	FUNCTION	1	gbt_cash_consistent (internal, money, int2, oid, internal),
-	FUNCTION	2	gbt_cash_union (bytea, internal),
-	FUNCTION	3	gbt_cash_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_cash_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_cash_picksplit (internal, internal),
-	FUNCTION	7	gbt_cash_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_cash_ops USING gist ADD
-	OPERATOR	6	<> (money, money) ,
-	OPERATOR	15	<-> (money, money) FOR ORDER BY pg_catalog.money_ops ,
-	FUNCTION	8 (money, money) gbt_cash_distance (internal, money, int2, oid) ;
-
-
---
---
---
--- macaddr ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_macad_consistent(internal,macaddr,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_macad_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_macad_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_macad_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_macad_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_macad_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_macaddr_ops
-DEFAULT FOR TYPE macaddr USING gist
-AS
-	OPERATOR	1	< ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	= ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	> ,
-	FUNCTION	1	gbt_macad_consistent (internal, macaddr, int2, oid, internal),
-	FUNCTION	2	gbt_macad_union (bytea, internal),
-	FUNCTION	3	gbt_macad_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_macad_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_macad_picksplit (internal, internal),
-	FUNCTION	7	gbt_macad_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_macaddr_ops USING gist ADD
-	OPERATOR	6	<> (macaddr, macaddr) ;
-
-
---
---
---
--- text/ bpchar ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_text_consistent(internal,text,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_text_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bpchar_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_text_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_text_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_text_union(bytea, internal)
-RETURNS gbtreekey_var
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_text_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_text_ops
-DEFAULT FOR TYPE text USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_text_consistent (internal, text, int2, oid, internal),
-	FUNCTION	2	gbt_text_union (bytea, internal),
-	FUNCTION	3	gbt_text_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_text_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_text_picksplit (internal, internal),
-	FUNCTION	7	gbt_text_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_text_ops USING gist ADD
-	OPERATOR	6	<> (text, text) ;
-
-
----- Create the operator class
-CREATE OPERATOR CLASS gist_bpchar_ops
-DEFAULT FOR TYPE bpchar USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_bpchar_consistent (internal, bpchar , int2, oid, internal),
-	FUNCTION	2	gbt_text_union (bytea, internal),
-	FUNCTION	3	gbt_bpchar_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_text_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_text_picksplit (internal, internal),
-	FUNCTION	7	gbt_text_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_bpchar_ops USING gist ADD
-	OPERATOR	6	<> (bpchar, bpchar) ;
-
-
---
---
--- bytea ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_bytea_consistent(internal,bytea,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bytea_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bytea_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bytea_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bytea_union(bytea, internal)
-RETURNS gbtreekey_var
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bytea_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_bytea_ops
-DEFAULT FOR TYPE bytea USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_bytea_consistent (internal, bytea, int2, oid, internal),
-	FUNCTION	2	gbt_bytea_union (bytea, internal),
-	FUNCTION	3	gbt_bytea_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_bytea_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_bytea_picksplit (internal, internal),
-	FUNCTION	7	gbt_bytea_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_bytea_ops USING gist ADD
-	OPERATOR	6	<> (bytea, bytea) ;
-
-
---
---
---
--- numeric ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_numeric_consistent(internal,numeric,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_numeric_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_numeric_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_numeric_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_numeric_union(bytea, internal)
-RETURNS gbtreekey_var
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_numeric_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_numeric_ops
-DEFAULT FOR TYPE numeric USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_numeric_consistent (internal, numeric, int2, oid, internal),
-	FUNCTION	2	gbt_numeric_union (bytea, internal),
-	FUNCTION	3	gbt_numeric_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_numeric_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_numeric_picksplit (internal, internal),
-	FUNCTION	7	gbt_numeric_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_numeric_ops USING gist ADD
-	OPERATOR	6	<> (numeric, numeric) ;
-
-
---
---
--- bit ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_bit_consistent(internal,bit,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bit_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bit_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bit_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bit_union(bytea, internal)
-RETURNS gbtreekey_var
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_bit_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_bit_ops
-DEFAULT FOR TYPE bit USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_bit_consistent (internal, bit, int2, oid, internal),
-	FUNCTION	2	gbt_bit_union (bytea, internal),
-	FUNCTION	3	gbt_bit_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_bit_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_bit_picksplit (internal, internal),
-	FUNCTION	7	gbt_bit_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_bit_ops USING gist ADD
-	OPERATOR	6	<> (bit, bit) ;
-
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_vbit_ops
-DEFAULT FOR TYPE varbit USING gist
-AS
-	OPERATOR	1	<  ,
-	OPERATOR	2	<= ,
-	OPERATOR	3	=  ,
-	OPERATOR	4	>= ,
-	OPERATOR	5	>  ,
-	FUNCTION	1	gbt_bit_consistent (internal, bit, int2, oid, internal),
-	FUNCTION	2	gbt_bit_union (bytea, internal),
-	FUNCTION	3	gbt_bit_compress (internal),
-	FUNCTION	4	gbt_var_decompress (internal),
-	FUNCTION	5	gbt_bit_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_bit_picksplit (internal, internal),
-	FUNCTION	7	gbt_bit_same (internal, internal, internal),
-	STORAGE			gbtreekey_var;
-
-ALTER OPERATOR FAMILY gist_vbit_ops USING gist ADD
-	OPERATOR	6	<> (varbit, varbit) ;
-
-
---
---
---
--- inet/cidr ops
---
---
---
--- define the GiST support methods
-CREATE FUNCTION gbt_inet_consistent(internal,inet,int2,oid,internal)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_inet_compress(internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_inet_penalty(internal,internal,internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_inet_picksplit(internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_inet_union(bytea, internal)
-RETURNS gbtreekey16
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
-CREATE FUNCTION gbt_inet_same(internal, internal, internal)
-RETURNS internal
-AS 'MODULE_PATHNAME'
-LANGUAGE C IMMUTABLE STRICT;
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_inet_ops
-DEFAULT FOR TYPE inet USING gist
-AS
-	OPERATOR	1	<   ,
-	OPERATOR	2	<=  ,
-	OPERATOR	3	=   ,
-	OPERATOR	4	>=  ,
-	OPERATOR	5	>   ,
-	FUNCTION	1	gbt_inet_consistent (internal, inet, int2, oid, internal),
-	FUNCTION	2	gbt_inet_union (bytea, internal),
-	FUNCTION	3	gbt_inet_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_inet_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_inet_picksplit (internal, internal),
-	FUNCTION	7	gbt_inet_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_inet_ops USING gist ADD
-	OPERATOR	6	<>  (inet, inet) ;
-
-
--- Create the operator class
-CREATE OPERATOR CLASS gist_cidr_ops
-DEFAULT FOR TYPE cidr USING gist
-AS
-	OPERATOR	1	<  (inet, inet)  ,
-	OPERATOR	2	<= (inet, inet)  ,
-	OPERATOR	3	=  (inet, inet)  ,
-	OPERATOR	4	>= (inet, inet)  ,
-	OPERATOR	5	>  (inet, inet)  ,
-	FUNCTION	1	gbt_inet_consistent (internal, inet, int2, oid, internal),
-	FUNCTION	2	gbt_inet_union (bytea, internal),
-	FUNCTION	3	gbt_inet_compress (internal),
-	FUNCTION	4	gbt_decompress (internal),
-	FUNCTION	5	gbt_inet_penalty (internal, internal, internal),
-	FUNCTION	6	gbt_inet_picksplit (internal, internal),
-	FUNCTION	7	gbt_inet_same (internal, internal, internal),
-	STORAGE		gbtreekey16;
-
-ALTER OPERATOR FAMILY gist_cidr_ops USING gist ADD
-	OPERATOR	6	<> (inet, inet) ;
diff --git a/contrib/btree_gist/btree_gist--1.1.sql b/contrib/btree_gist/btree_gist--1.1.sql
new file mode 100644
index 0000000..56aedd9
--- /dev/null
+++ b/contrib/btree_gist/btree_gist--1.1.sql
@@ -0,0 +1,1409 @@
+/* contrib/btree_gist/btree_gist--1.0.sql */
+
+-- complain if script is sourced in psql, rather than via CREATE EXTENSION
+\echo Use "CREATE EXTENSION btree_gist" to load this file. \quit
+
+CREATE FUNCTION gbtreekey4_in(cstring)
+RETURNS gbtreekey4
+AS 'MODULE_PATHNAME', 'gbtreekey_in'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbtreekey4_out(gbtreekey4)
+RETURNS cstring
+AS 'MODULE_PATHNAME', 'gbtreekey_out'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE TYPE gbtreekey4 (
+	INTERNALLENGTH = 4,
+	INPUT  = gbtreekey4_in,
+	OUTPUT = gbtreekey4_out
+);
+
+CREATE FUNCTION gbtreekey8_in(cstring)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME', 'gbtreekey_in'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbtreekey8_out(gbtreekey8)
+RETURNS cstring
+AS 'MODULE_PATHNAME', 'gbtreekey_out'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE TYPE gbtreekey8 (
+	INTERNALLENGTH = 8,
+	INPUT  = gbtreekey8_in,
+	OUTPUT = gbtreekey8_out
+);
+
+CREATE FUNCTION gbtreekey16_in(cstring)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME', 'gbtreekey_in'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbtreekey16_out(gbtreekey16)
+RETURNS cstring
+AS 'MODULE_PATHNAME', 'gbtreekey_out'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE TYPE gbtreekey16 (
+	INTERNALLENGTH = 16,
+	INPUT  = gbtreekey16_in,
+	OUTPUT = gbtreekey16_out
+);
+
+CREATE FUNCTION gbtreekey32_in(cstring)
+RETURNS gbtreekey32
+AS 'MODULE_PATHNAME', 'gbtreekey_in'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbtreekey32_out(gbtreekey32)
+RETURNS cstring
+AS 'MODULE_PATHNAME', 'gbtreekey_out'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE TYPE gbtreekey32 (
+	INTERNALLENGTH = 32,
+	INPUT  = gbtreekey32_in,
+	OUTPUT = gbtreekey32_out
+);
+
+CREATE FUNCTION gbtreekey_var_in(cstring)
+RETURNS gbtreekey_var
+AS 'MODULE_PATHNAME', 'gbtreekey_in'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbtreekey_var_out(gbtreekey_var)
+RETURNS cstring
+AS 'MODULE_PATHNAME', 'gbtreekey_out'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE TYPE gbtreekey_var (
+	INTERNALLENGTH = VARIABLE,
+	INPUT  = gbtreekey_var_in,
+	OUTPUT = gbtreekey_var_out,
+	STORAGE = EXTENDED
+);
+
+--distance operators
+
+CREATE FUNCTION cash_dist(money, money)
+RETURNS money
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = money,
+	RIGHTARG = money,
+	PROCEDURE = cash_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION date_dist(date, date)
+RETURNS int4
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = date,
+	RIGHTARG = date,
+	PROCEDURE = date_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION float4_dist(float4, float4)
+RETURNS float4
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = float4,
+	RIGHTARG = float4,
+	PROCEDURE = float4_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION float8_dist(float8, float8)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = float8,
+	RIGHTARG = float8,
+	PROCEDURE = float8_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION int2_dist(int2, int2)
+RETURNS int2
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = int2,
+	RIGHTARG = int2,
+	PROCEDURE = int2_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION int4_dist(int4, int4)
+RETURNS int4
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = int4,
+	RIGHTARG = int4,
+	PROCEDURE = int4_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION int8_dist(int8, int8)
+RETURNS int8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = int8,
+	RIGHTARG = int8,
+	PROCEDURE = int8_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION interval_dist(interval, interval)
+RETURNS interval
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = interval,
+	RIGHTARG = interval,
+	PROCEDURE = interval_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION oid_dist(oid, oid)
+RETURNS oid
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = oid,
+	RIGHTARG = oid,
+	PROCEDURE = oid_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION time_dist(time, time)
+RETURNS interval
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = time,
+	RIGHTARG = time,
+	PROCEDURE = time_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION ts_dist(timestamp, timestamp)
+RETURNS interval
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = timestamp,
+	RIGHTARG = timestamp,
+	PROCEDURE = ts_dist,
+	COMMUTATOR = '<->'
+);
+
+CREATE FUNCTION tstz_dist(timestamptz, timestamptz)
+RETURNS interval
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE OPERATOR <-> (
+	LEFTARG = timestamptz,
+	RIGHTARG = timestamptz,
+	PROCEDURE = tstz_dist,
+	COMMUTATOR = '<->'
+);
+
+
+--
+--
+--
+-- oid ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_oid_consistent(internal,oid,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_distance(internal,oid,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_decompress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_var_decompress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_union(bytea, internal)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_oid_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_oid_ops
+DEFAULT FOR TYPE oid USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_oid_consistent (internal, oid, int2, oid, internal),
+	FUNCTION	2	gbt_oid_union (bytea, internal),
+	FUNCTION	3	gbt_oid_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_oid_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_oid_picksplit (internal, internal),
+	FUNCTION	7	gbt_oid_same (internal, internal, internal),
+	STORAGE		gbtreekey8;
+
+-- Add operators that are new in 9.1.  We do it like this, leaving them
+-- "loose" in the operator family rather than bound into the opclass, because
+-- that's the only state that can be reproduced during an upgrade from 9.0.
+
+ALTER OPERATOR FAMILY gist_oid_ops USING gist ADD
+	OPERATOR	6	<> (oid, oid) ,
+	OPERATOR	15	<-> (oid, oid) FOR ORDER BY pg_catalog.oid_ops ,
+	FUNCTION	8 (oid, oid) gbt_oid_distance (internal, oid, int2, oid) ;
+
+
+--
+--
+--
+-- int2 ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_int2_consistent(internal,int2,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_distance(internal,int2,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_union(bytea, internal)
+RETURNS gbtreekey4
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int2_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_int2_ops
+DEFAULT FOR TYPE int2 USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_int2_consistent (internal, int2, int2, oid, internal),
+	FUNCTION	2	gbt_int2_union (bytea, internal),
+	FUNCTION	3	gbt_int2_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_int2_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_int2_picksplit (internal, internal),
+	FUNCTION	7	gbt_int2_same (internal, internal, internal),
+	STORAGE		gbtreekey4;
+
+ALTER OPERATOR FAMILY gist_int2_ops USING gist ADD
+	OPERATOR	6	<> (int2, int2) ,
+	OPERATOR	15	<-> (int2, int2) FOR ORDER BY pg_catalog.integer_ops ,
+	FUNCTION	8 (int2, int2) gbt_int2_distance (internal, int2, int2, oid) ;
+
+
+--
+--
+--
+-- int4 ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_int4_consistent(internal,int4,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_distance(internal,int4,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_union(bytea, internal)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int4_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_int4_ops
+DEFAULT FOR TYPE int4 USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_int4_consistent (internal, int4, int2, oid, internal),
+	FUNCTION	2	gbt_int4_union (bytea, internal),
+	FUNCTION	3	gbt_int4_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_int4_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_int4_picksplit (internal, internal),
+	FUNCTION	7	gbt_int4_same (internal, internal, internal),
+	STORAGE		gbtreekey8;
+
+ALTER OPERATOR FAMILY gist_int4_ops USING gist ADD
+	OPERATOR	6	<> (int4, int4) ,
+	OPERATOR	15	<-> (int4, int4) FOR ORDER BY pg_catalog.integer_ops ,
+	FUNCTION	8 (int4, int4) gbt_int4_distance (internal, int4, int2, oid) ;
+
+
+--
+--
+--
+-- int8 ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_int8_consistent(internal,int8,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_distance(internal,int8,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_union(bytea, internal)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_int8_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_int8_ops
+DEFAULT FOR TYPE int8 USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_int8_consistent (internal, int8, int2, oid, internal),
+	FUNCTION	2	gbt_int8_union (bytea, internal),
+	FUNCTION	3	gbt_int8_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_int8_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_int8_picksplit (internal, internal),
+	FUNCTION	7	gbt_int8_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_int8_ops USING gist ADD
+	OPERATOR	6	<> (int8, int8) ,
+	OPERATOR	15	<-> (int8, int8) FOR ORDER BY pg_catalog.integer_ops ,
+	FUNCTION	8 (int8, int8) gbt_int8_distance (internal, int8, int2, oid) ;
+
+
+--
+--
+--
+-- float4 ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_float4_consistent(internal,float4,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_distance(internal,float4,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_union(bytea, internal)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float4_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_float4_ops
+DEFAULT FOR TYPE float4 USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_float4_consistent (internal, float4, int2, oid, internal),
+	FUNCTION	2	gbt_float4_union (bytea, internal),
+	FUNCTION	3	gbt_float4_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_float4_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_float4_picksplit (internal, internal),
+	FUNCTION	7	gbt_float4_same (internal, internal, internal),
+	STORAGE		gbtreekey8;
+
+ALTER OPERATOR FAMILY gist_float4_ops USING gist ADD
+	OPERATOR	6	<> (float4, float4) ,
+	OPERATOR	15	<-> (float4, float4) FOR ORDER BY pg_catalog.float_ops ,
+	FUNCTION	8 (float4, float4) gbt_float4_distance (internal, float4, int2, oid) ;
+
+
+--
+--
+--
+-- float8 ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_float8_consistent(internal,float8,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_distance(internal,float8,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_union(bytea, internal)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_float8_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_float8_ops
+DEFAULT FOR TYPE float8 USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_float8_consistent (internal, float8, int2, oid, internal),
+	FUNCTION	2	gbt_float8_union (bytea, internal),
+	FUNCTION	3	gbt_float8_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_float8_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_float8_picksplit (internal, internal),
+	FUNCTION	7	gbt_float8_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_float8_ops USING gist ADD
+	OPERATOR	6	<> (float8, float8) ,
+	OPERATOR	15	<-> (float8, float8) FOR ORDER BY pg_catalog.float_ops ,
+	FUNCTION	8 (float8, float8) gbt_float8_distance (internal, float8, int2, oid) ;
+
+
+--
+--
+--
+-- timestamp ops
+--
+--
+--
+
+CREATE FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_distance(internal,timestamp,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_tstz_distance(internal,timestamptz,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_tstz_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_union(bytea, internal)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_ts_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_timestamp_ops
+DEFAULT FOR TYPE timestamp USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_ts_consistent (internal, timestamp, int2, oid, internal),
+	FUNCTION	2	gbt_ts_union (bytea, internal),
+	FUNCTION	3	gbt_ts_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_ts_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_ts_picksplit (internal, internal),
+	FUNCTION	7	gbt_ts_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_timestamp_ops USING gist ADD
+	OPERATOR	6	<> (timestamp, timestamp) ,
+	OPERATOR	15	<-> (timestamp, timestamp) FOR ORDER BY pg_catalog.interval_ops ,
+	FUNCTION	8 (timestamp, timestamp) gbt_ts_distance (internal, timestamp, int2, oid) ;
+
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_timestamptz_ops
+DEFAULT FOR TYPE timestamptz USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_tstz_consistent (internal, timestamptz, int2, oid, internal),
+	FUNCTION	2	gbt_ts_union (bytea, internal),
+	FUNCTION	3	gbt_tstz_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_ts_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_ts_picksplit (internal, internal),
+	FUNCTION	7	gbt_ts_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_timestamptz_ops USING gist ADD
+	OPERATOR	6	<> (timestamptz, timestamptz) ,
+	OPERATOR	15	<-> (timestamptz, timestamptz) FOR ORDER BY pg_catalog.interval_ops ,
+	FUNCTION	8 (timestamptz, timestamptz) gbt_tstz_distance (internal, timestamptz, int2, oid) ;
+
+
+--
+--
+--
+-- time ops
+--
+--
+--
+
+CREATE FUNCTION gbt_time_consistent(internal,time,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_distance(internal,time,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_timetz_consistent(internal,timetz,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_timetz_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_union(bytea, internal)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_time_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_time_ops
+DEFAULT FOR TYPE time USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_time_consistent (internal, time, int2, oid, internal),
+	FUNCTION	2	gbt_time_union (bytea, internal),
+	FUNCTION	3	gbt_time_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_time_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_time_picksplit (internal, internal),
+	FUNCTION	7	gbt_time_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_time_ops USING gist ADD
+	OPERATOR	6	<> (time, time) ,
+	OPERATOR	15	<-> (time, time) FOR ORDER BY pg_catalog.interval_ops ,
+	FUNCTION	8 (time, time) gbt_time_distance (internal, time, int2, oid) ;
+
+
+CREATE OPERATOR CLASS gist_timetz_ops
+DEFAULT FOR TYPE timetz USING gist
+AS
+	OPERATOR	1	<   ,
+	OPERATOR	2	<=  ,
+	OPERATOR	3	=   ,
+	OPERATOR	4	>=  ,
+	OPERATOR	5	>   ,
+	FUNCTION	1	gbt_timetz_consistent (internal, timetz, int2, oid, internal),
+	FUNCTION	2	gbt_time_union (bytea, internal),
+	FUNCTION	3	gbt_timetz_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_time_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_time_picksplit (internal, internal),
+	FUNCTION	7	gbt_time_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_timetz_ops USING gist ADD
+	OPERATOR	6	<> (timetz, timetz) ;
+
+
+--
+--
+--
+-- date ops
+--
+--
+--
+
+CREATE FUNCTION gbt_date_consistent(internal,date,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_distance(internal,date,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_union(bytea, internal)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_date_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_date_ops
+DEFAULT FOR TYPE date USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_date_consistent (internal, date, int2, oid, internal),
+	FUNCTION	2	gbt_date_union (bytea, internal),
+	FUNCTION	3	gbt_date_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_date_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_date_picksplit (internal, internal),
+	FUNCTION	7	gbt_date_same (internal, internal, internal),
+	STORAGE		gbtreekey8;
+
+ALTER OPERATOR FAMILY gist_date_ops USING gist ADD
+	OPERATOR	6	<> (date, date) ,
+	OPERATOR	15	<-> (date, date) FOR ORDER BY pg_catalog.integer_ops ,
+	FUNCTION	8 (date, date) gbt_date_distance (internal, date, int2, oid) ;
+
+
+--
+--
+--
+-- interval ops
+--
+--
+--
+
+CREATE FUNCTION gbt_intv_consistent(internal,interval,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_distance(internal,interval,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_decompress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_union(bytea, internal)
+RETURNS gbtreekey32
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_intv_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_interval_ops
+DEFAULT FOR TYPE interval USING gist
+AS
+	OPERATOR	1	< ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	= ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	> ,
+	FUNCTION	1	gbt_intv_consistent (internal, interval, int2, oid, internal),
+	FUNCTION	2	gbt_intv_union (bytea, internal),
+	FUNCTION	3	gbt_intv_compress (internal),
+	FUNCTION	4	gbt_intv_decompress (internal),
+	FUNCTION	5	gbt_intv_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_intv_picksplit (internal, internal),
+	FUNCTION	7	gbt_intv_same (internal, internal, internal),
+	STORAGE		gbtreekey32;
+
+ALTER OPERATOR FAMILY gist_interval_ops USING gist ADD
+	OPERATOR	6	<> (interval, interval) ,
+	OPERATOR	15	<-> (interval, interval) FOR ORDER BY pg_catalog.interval_ops ,
+	FUNCTION	8 (interval, interval) gbt_intv_distance (internal, interval, int2, oid) ;
+
+
+--
+--
+--
+-- cash ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_cash_consistent(internal,money,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_distance(internal,money,int2,oid)
+RETURNS float8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_union(bytea, internal)
+RETURNS gbtreekey8
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_cash_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_cash_ops
+DEFAULT FOR TYPE money USING gist
+AS
+	OPERATOR	1	< ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	= ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	> ,
+	FUNCTION	1	gbt_cash_consistent (internal, money, int2, oid, internal),
+	FUNCTION	2	gbt_cash_union (bytea, internal),
+	FUNCTION	3	gbt_cash_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_cash_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_cash_picksplit (internal, internal),
+	FUNCTION	7	gbt_cash_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_cash_ops USING gist ADD
+	OPERATOR	6	<> (money, money) ,
+	OPERATOR	15	<-> (money, money) FOR ORDER BY pg_catalog.money_ops ,
+	FUNCTION	8 (money, money) gbt_cash_distance (internal, money, int2, oid) ;
+
+
+--
+--
+--
+-- macaddr ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_macad_consistent(internal,macaddr,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_macad_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_macad_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_macad_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_macad_union(bytea, internal)
+RETURNS gbtreekey16
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_macad_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_macaddr_ops
+DEFAULT FOR TYPE macaddr USING gist
+AS
+	OPERATOR	1	< ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	= ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	> ,
+	FUNCTION	1	gbt_macad_consistent (internal, macaddr, int2, oid, internal),
+	FUNCTION	2	gbt_macad_union (bytea, internal),
+	FUNCTION	3	gbt_macad_compress (internal),
+	FUNCTION	4	gbt_decompress (internal),
+	FUNCTION	5	gbt_macad_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_macad_picksplit (internal, internal),
+	FUNCTION	7	gbt_macad_same (internal, internal, internal),
+	STORAGE		gbtreekey16;
+
+ALTER OPERATOR FAMILY gist_macaddr_ops USING gist ADD
+	OPERATOR	6	<> (macaddr, macaddr) ;
+
+
+--
+--
+--
+-- text/ bpchar ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_text_consistent(internal,text,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_text_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bpchar_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_text_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_text_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_text_union(bytea, internal)
+RETURNS gbtreekey_var
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_text_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_text_ops
+DEFAULT FOR TYPE text USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_text_consistent (internal, text, int2, oid, internal),
+	FUNCTION	2	gbt_text_union (bytea, internal),
+	FUNCTION	3	gbt_text_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_text_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_text_picksplit (internal, internal),
+	FUNCTION	7	gbt_text_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_text_ops USING gist ADD
+	OPERATOR	6	<> (text, text) ;
+
+
+---- Create the operator class
+CREATE OPERATOR CLASS gist_bpchar_ops
+DEFAULT FOR TYPE bpchar USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_bpchar_consistent (internal, bpchar , int2, oid, internal),
+	FUNCTION	2	gbt_text_union (bytea, internal),
+	FUNCTION	3	gbt_bpchar_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_text_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_text_picksplit (internal, internal),
+	FUNCTION	7	gbt_text_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_bpchar_ops USING gist ADD
+	OPERATOR	6	<> (bpchar, bpchar) ;
+
+
+--
+--
+-- bytea ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_bytea_consistent(internal,bytea,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bytea_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bytea_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bytea_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bytea_union(bytea, internal)
+RETURNS gbtreekey_var
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bytea_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_bytea_ops
+DEFAULT FOR TYPE bytea USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_bytea_consistent (internal, bytea, int2, oid, internal),
+	FUNCTION	2	gbt_bytea_union (bytea, internal),
+	FUNCTION	3	gbt_bytea_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_bytea_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_bytea_picksplit (internal, internal),
+	FUNCTION	7	gbt_bytea_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_bytea_ops USING gist ADD
+	OPERATOR	6	<> (bytea, bytea) ;
+
+
+--
+--
+--
+-- numeric ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_numeric_consistent(internal,numeric,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_numeric_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_numeric_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_numeric_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_numeric_union(bytea, internal)
+RETURNS gbtreekey_var
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_numeric_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_numeric_ops
+DEFAULT FOR TYPE numeric USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_numeric_consistent (internal, numeric, int2, oid, internal),
+	FUNCTION	2	gbt_numeric_union (bytea, internal),
+	FUNCTION	3	gbt_numeric_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_numeric_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_numeric_picksplit (internal, internal),
+	FUNCTION	7	gbt_numeric_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_numeric_ops USING gist ADD
+	OPERATOR	6	<> (numeric, numeric) ;
+
+
+--
+--
+-- bit ops
+--
+--
+--
+-- define the GiST support methods
+CREATE FUNCTION gbt_bit_consistent(internal,bit,int2,oid,internal)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bit_compress(internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bit_penalty(internal,internal,internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bit_picksplit(internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bit_union(bytea, internal)
+RETURNS gbtreekey_var
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+CREATE FUNCTION gbt_bit_same(internal, internal, internal)
+RETURNS internal
+AS 'MODULE_PATHNAME'
+LANGUAGE C IMMUTABLE STRICT;
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_bit_ops
+DEFAULT FOR TYPE bit USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_bit_consistent (internal, bit, int2, oid, internal),
+	FUNCTION	2	gbt_bit_union (bytea, internal),
+	FUNCTION	3	gbt_bit_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_bit_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_bit_picksplit (internal, internal),
+	FUNCTION	7	gbt_bit_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_bit_ops USING gist ADD
+	OPERATOR	6	<> (bit, bit) ;
+
+
+-- Create the operator class
+CREATE OPERATOR CLASS gist_vbit_ops
+DEFAULT FOR TYPE varbit USING gist
+AS
+	OPERATOR	1	<  ,
+	OPERATOR	2	<= ,
+	OPERATOR	3	=  ,
+	OPERATOR	4	>= ,
+	OPERATOR	5	>  ,
+	FUNCTION	1	gbt_bit_consistent (internal, bit, int2, oid, internal),
+	FUNCTION	2	gbt_bit_union (bytea, internal),
+	FUNCTION	3	gbt_bit_compress (internal),
+	FUNCTION	4	gbt_var_decompress (internal),
+	FUNCTION	5	gbt_bit_penalty (internal, internal, internal),
+	FUNCTION	6	gbt_bit_picksplit (internal, internal),
+	FUNCTION	7	gbt_bit_same (internal, internal, internal),
+	STORAGE			gbtreekey_var;
+
+ALTER OPERATOR FAMILY gist_vbit_ops USING gist ADD
+	OPERATOR	6	<> (varbit, varbit) ;
diff --git a/contrib/btree_gist/btree_gist.control b/contrib/btree_gist/btree_gist.control
index 10e2f94..c7adfeb 100644
--- a/contrib/btree_gist/btree_gist.control
+++ b/contrib/btree_gist/btree_gist.control
@@ -1,5 +1,5 @@
 # btree_gist extension
 comment = 'support for indexing common datatypes in GiST'
-default_version = '1.0'
+default_version = '1.1'
 module_pathname = '$libdir/btree_gist'
 relocatable = true
diff --git a/contrib/btree_gist/btree_gist.h b/contrib/btree_gist/btree_gist.h
index dcffbb5..4a58a3d 100644
--- a/contrib/btree_gist/btree_gist.h
+++ b/contrib/btree_gist/btree_gist.h
@@ -31,7 +31,6 @@ enum gbtree_type
 	gbt_t_bpchar,
 	gbt_t_bytea,
 	gbt_t_bit,
-	gbt_t_inet
 };
 
 
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
deleted file mode 100644
index c136296..0000000
--- a/contrib/btree_gist/btree_inet.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * contrib/btree_gist/btree_inet.c
- */
-#include "postgres.h"
-
-#include "btree_gist.h"
-#include "btree_utils_num.h"
-#include "utils/builtins.h"
-#include "utils/inet.h"
-#include "catalog/pg_type.h"
-
-typedef struct inetkey
-{
-	double		lower;
-	double		upper;
-} inetKEY;
-
-/*
-** inet ops
-*/
-PG_FUNCTION_INFO_V1(gbt_inet_compress);
-PG_FUNCTION_INFO_V1(gbt_inet_union);
-PG_FUNCTION_INFO_V1(gbt_inet_picksplit);
-PG_FUNCTION_INFO_V1(gbt_inet_consistent);
-PG_FUNCTION_INFO_V1(gbt_inet_penalty);
-PG_FUNCTION_INFO_V1(gbt_inet_same);
-
-Datum		gbt_inet_compress(PG_FUNCTION_ARGS);
-Datum		gbt_inet_union(PG_FUNCTION_ARGS);
-Datum		gbt_inet_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_inet_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_inet_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_inet_same(PG_FUNCTION_ARGS);
-
-
-static bool
-gbt_inetgt(const void *a, const void *b)
-{
-	return (*((const double *) a) > *((const double *) b));
-}
-static bool
-gbt_inetge(const void *a, const void *b)
-{
-	return (*((const double *) a) >= *((const double *) b));
-}
-static bool
-gbt_ineteq(const void *a, const void *b)
-{
-	return (*((const double *) a) == *((const double *) b));
-}
-static bool
-gbt_inetle(const void *a, const void *b)
-{
-	return (*((const double *) a) <= *((const double *) b));
-}
-static bool
-gbt_inetlt(const void *a, const void *b)
-{
-	return (*((const double *) a) < *((const double *) b));
-}
-
-static int
-gbt_inetkey_cmp(const void *a, const void *b)
-{
-	inetKEY    *ia = (inetKEY *) (((const Nsrt *) a)->t);
-	inetKEY    *ib = (inetKEY *) (((const Nsrt *) b)->t);
-
-	if (ia->lower == ib->lower)
-	{
-		if (ia->upper == ib->upper)
-			return 0;
-
-		return (ia->upper > ib->upper) ? 1 : -1;
-	}
-
-	return (ia->lower > ib->lower) ? 1 : -1;
-}
-
-
-static const gbtree_ninfo tinfo =
-{
-	gbt_t_inet,
-	sizeof(double),
-	gbt_inetgt,
-	gbt_inetge,
-	gbt_ineteq,
-	gbt_inetle,
-	gbt_inetlt,
-	gbt_inetkey_cmp,
-	NULL
-};
-
-
-/**************************************************
- * inet ops
- **************************************************/
-
-
-Datum
-gbt_inet_compress(PG_FUNCTION_ARGS)
-{
-	GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-	GISTENTRY  *retval;
-
-	if (entry->leafkey)
-	{
-		inetKEY    *r = (inetKEY *) palloc(sizeof(inetKEY));
-
-		retval = palloc(sizeof(GISTENTRY));
-		r->lower = convert_network_to_scalar(entry->key, INETOID);
-		r->upper = r->lower;
-		gistentryinit(*retval, PointerGetDatum(r),
-					  entry->rel, entry->page,
-					  entry->offset, FALSE);
-	}
-	else
-		retval = entry;
-
-	PG_RETURN_POINTER(retval);
-}
-
-
-Datum
-gbt_inet_consistent(PG_FUNCTION_ARGS)
-{
-	GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-	double		query = convert_network_to_scalar(PG_GETARG_DATUM(1), INETOID);
-	StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
-
-	/* Oid		subtype = PG_GETARG_OID(3); */
-	bool	   *recheck = (bool *) PG_GETARG_POINTER(4);
-	inetKEY    *kkk = (inetKEY *) DatumGetPointer(entry->key);
-	GBT_NUMKEY_R key;
-
-	/* All cases served by this function are inexact */
-	*recheck = true;
-
-	key.lower = (GBT_NUMKEY *) &kkk->lower;
-	key.upper = (GBT_NUMKEY *) &kkk->upper;
-
-	PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
-									  &strategy, GIST_LEAF(entry), &tinfo));
-}
-
-
-Datum
-gbt_inet_union(PG_FUNCTION_ARGS)
-{
-	GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0);
-	void	   *out = palloc(sizeof(inetKEY));
-
-	*(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
-	PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo));
-}
-
-
-Datum
-gbt_inet_penalty(PG_FUNCTION_ARGS)
-{
-	inetKEY    *origentry = (inetKEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key);
-	inetKEY    *newentry = (inetKEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key);
-	float	   *result = (float *) PG_GETARG_POINTER(2);
-
-	penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
-
-	PG_RETURN_POINTER(result);
-
-}
-
-Datum
-gbt_inet_picksplit(PG_FUNCTION_ARGS)
-{
-	PG_RETURN_POINTER(gbt_num_picksplit(
-									(GistEntryVector *) PG_GETARG_POINTER(0),
-									  (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
-										&tinfo
-										));
-}
-
-Datum
-gbt_inet_same(PG_FUNCTION_ARGS)
-{
-	inetKEY    *b1 = (inetKEY *) PG_GETARG_POINTER(0);
-	inetKEY    *b2 = (inetKEY *) PG_GETARG_POINTER(1);
-	bool	   *result = (bool *) PG_GETARG_POINTER(2);
-
-	*result = gbt_num_same((void *) b1, (void *) b2, &tinfo);
-	PG_RETURN_POINTER(result);
-}
diff --git a/doc/src/sgml/btree-gist.sgml b/doc/src/sgml/btree-gist.sgml
index 2275a99..40755c9 100644
--- a/doc/src/sgml/btree-gist.sgml
+++ b/doc/src/sgml/btree-gist.sgml
@@ -16,7 +16,7 @@
   <type>time without time zone</>, <type>date</>, <type>interval</>,
   <type>oid</>, <type>money</>, <type>char</>,
   <type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>,
-  <type>varbit</>, <type>macaddr</>, <type>inet</>, and <type>cidr</>.
+  <type>varbit</>, and <type>macaddr</>.
  </para>
 
  <para>
