aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_gist.h
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2004-05-28 10:43:32 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2004-05-28 10:43:32 +0000
commit42d069886f38687839388c615af608706508b557 (patch)
tree0409615407a17d22e2511ac14745277467853453 /contrib/btree_gist/btree_gist.h
parent1a321f26d88e5c64bccba9d36920aede1e201729 (diff)
downloadpostgresql-42d069886f38687839388c615af608706508b557.tar.gz
postgresql-42d069886f38687839388c615af608706508b557.zip
New version. Add support for int2, int8, float4, float8, timestamp with/without time zone, time with/without time zone, date, interval, oid, money and macaddr, char, varchar/text, bytea, numeric, bit, varbit, inet/cidr types for GiST
Diffstat (limited to 'contrib/btree_gist/btree_gist.h')
-rw-r--r--contrib/btree_gist/btree_gist.h42
1 files changed, 28 insertions, 14 deletions
diff --git a/contrib/btree_gist/btree_gist.h b/contrib/btree_gist/btree_gist.h
index 08f6f1d29e2..1b4fe837d26 100644
--- a/contrib/btree_gist/btree_gist.h
+++ b/contrib/btree_gist/btree_gist.h
@@ -1,25 +1,39 @@
#include "postgres.h"
-
#include "access/gist.h"
#include "access/itup.h"
#include "access/nbtree.h"
-#include "utils/geo_decls.h"
-typedef int (*CMPFUNC) (const void *a, const void *b);
-typedef void (*BINARY_UNION) (Datum *, char *);
+/* indexed types */
+enum gbtree_type
+{
+ gbt_t_var ,
+ gbt_t_int2 ,
+ gbt_t_int4 ,
+ gbt_t_int8 ,
+ gbt_t_float4 ,
+ gbt_t_float8 ,
+ gbt_t_numeric,
+ gbt_t_ts,
+ gbt_t_cash,
+ gbt_t_oid,
+ gbt_t_time,
+ gbt_t_date,
+ gbt_t_intv,
+ gbt_t_macad,
+ gbt_t_text,
+ gbt_t_bpchar,
+ gbt_t_bytea,
+ gbt_t_bit,
+ gbt_t_inet
+};
-/* used for sorting */
-typedef struct rix
-{
- int index;
- char *r;
-} RIX;
/*
-** Common btree-function (for all ops)
-*/
+ * Generic btree functions
+ */
+
+Datum gbtreekey_in (PG_FUNCTION_ARGS);
-extern GIST_SPLITVEC *btree_picksplit(GistEntryVector *entryvec, GIST_SPLITVEC *v,
- BINARY_UNION bu, CMPFUNC cmp);
+Datum gbtreekey_out(PG_FUNCTION_ARGS);