diff options
| author | Teodor Sigaev | 2004-05-28 10:43:32 +0000 |
|---|---|---|
| committer | Teodor Sigaev | 2004-05-28 10:43:32 +0000 |
| commit | 32460a9fb0f5d24295b021ccbbe7dc96a7543158 (patch) | |
| tree | 553b9d2715d381917705f279ba05012022253727 /contrib/btree_gist/btree_gist.h | |
| parent | 336b7a91f2a01af5080b6726ea538d9e808cdcf4 (diff) | |
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.h | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/contrib/btree_gist/btree_gist.h b/contrib/btree_gist/btree_gist.h index 08f6f1d29e..1b4fe837d2 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); |
