From a9289708af0bff1c45deae79a7c8f6db75d8ca16 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 22 Aug 2001 18:27:54 +0000 Subject: [PATCH] New contrib module for BTREE emulation in GiST. From Oleg Bartunov and Teodor Sigaev. --- contrib/Makefile | 6 +- contrib/README | 8 + contrib/btree_gist/Makefile | 66 ++ contrib/btree_gist/README.btree_gist | 31 + contrib/btree_gist/btree_gist.c | 557 +++++++++++ contrib/btree_gist/btree_gist.sql.in | 263 +++++ contrib/btree_gist/data/test_btree.data | 1000 ++++++++++++++++++++ contrib/btree_gist/data/test_btree_ts.data | 1000 ++++++++++++++++++++ contrib/btree_gist/expected/btree_gist.out | 39 + contrib/btree_gist/sql/btree_gist.sql | 36 + 10 files changed, 3003 insertions(+), 3 deletions(-) create mode 100644 contrib/btree_gist/Makefile create mode 100644 contrib/btree_gist/README.btree_gist create mode 100644 contrib/btree_gist/btree_gist.c create mode 100644 contrib/btree_gist/btree_gist.sql.in create mode 100644 contrib/btree_gist/data/test_btree.data create mode 100644 contrib/btree_gist/data/test_btree_ts.data create mode 100644 contrib/btree_gist/expected/btree_gist.out create mode 100644 contrib/btree_gist/sql/btree_gist.sql diff --git a/contrib/Makefile b/contrib/Makefile index 79dfa28ce4..df1cf98b69 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.23 2001/07/06 23:07:19 petere Exp $ +# $Header: /cvsroot/pgsql/contrib/Makefile,v 1.24 2001/08/22 18:27:53 tgl Exp $ subdir = contrib top_builddir = .. @@ -6,18 +6,19 @@ include $(top_builddir)/src/Makefile.global WANTED_DIRS = \ array \ + btree_gist \ cube \ dbase \ dblink \ earthdistance \ findoidjoins \ fulltextindex \ + fuzzystrmatch \ intarray \ isbn_issn \ lo \ mSQL-interface \ mac \ - metaphone \ miscutil \ noupdate \ oid2name \ @@ -30,7 +31,6 @@ WANTED_DIRS = \ rserv \ rtree_gist \ seg \ - soundex \ spi \ string \ tips \ diff --git a/contrib/README b/contrib/README index e01fb5f9ee..cf77f4ac99 100644 --- a/contrib/README +++ b/contrib/README @@ -30,6 +30,14 @@ array - Array iterator functions by Massimo Dal Zotto +btree_gist - + Support for emulating BTREE indexing in GiST + by Oleg Bartunov and Teodor Sigaev + +chkpass - + An auto-encrypted password datatype + by D'Arcy J.M. Cain + cube - Multidimensional-cube datatype (GiST indexing example) by Gene Selkov, Jr. diff --git a/contrib/btree_gist/Makefile b/contrib/btree_gist/Makefile new file mode 100644 index 0000000000..b84dd29c43 --- /dev/null +++ b/contrib/btree_gist/Makefile @@ -0,0 +1,66 @@ +subdir = contrib/btree_gist +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global + +# override libdir to install shlib in contrib not main directory +libdir := $(libdir)/contrib + +# shared library parameters +NAME= btree_gist +SO_MAJOR_VERSION= 1 +SO_MINOR_VERSION= 0 + +override CPPFLAGS += -I$(srcdir) + +OBJS= btree_gist.o + +all: all-lib $(NAME).sql + +# Shared library stuff +include $(top_srcdir)/src/Makefile.shlib + + +$(NAME).sql: $(NAME).sql.in + sed -e 's:MODULE_PATHNAME:$(libdir)/$(shlib):g' < $< > $@ + +.PHONY: submake +submake: + $(MAKE) -C $(top_builddir)/src/test/regress pg_regress + +# against installed postmaster +installcheck: submake + $(top_builddir)/src/test/regress/pg_regress btree_gist + +# in-tree test doesn't work yet (no way to install my shared library) +#check: all submake +# $(top_builddir)/src/test/regress/pg_regress --temp-install \ +# --top-builddir=$(top_builddir) btree_gist +check: + @echo "'make check' is not supported." + @echo "Do 'make install', then 'make installcheck' instead." + +install: all installdirs install-lib + #$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(docdir)/contrib + $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib + +installdirs: + $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir) + +uninstall: uninstall-lib + rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql + +clean distclean maintainer-clean: clean-lib + rm -f *.so y.tab.c y.tab.h $(OBJS) $(NAME).sql +# things created by various check targets + rm -rf results tmp_check log + rm -f regression.diffs regression.out regress.out run_check.out +ifeq ($(PORTNAME), win) + rm -f regress.def +endif + +depend dep: + $(CC) -MM $(CFLAGS) *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif diff --git a/contrib/btree_gist/README.btree_gist b/contrib/btree_gist/README.btree_gist new file mode 100644 index 0000000000..d61db62c3c --- /dev/null +++ b/contrib/btree_gist/README.btree_gist @@ -0,0 +1,31 @@ +This is B-Tree implementation using GiST for int4 and +timestamp types. + +All work was done by Teodor Sigaev (teodor@stack.net) and Oleg Bartunov +(oleg@sai.msu.su). See http://www.sai.msu.su/~megera/postgres/gist +for additional information. + +NOTICE: + This version will works only with postgresql version 7.2 and above + because of changes in interface of function calling and in system + tables. + +INSTALLATION: + + gmake + gmake install + -- load functions + psql < btree_gist.sql + +REGRESSION TEST: + + gmake installcheck + +EXAMPLE USAGE: + + create table test (a int4); + -- create index + create index testidx on test using gist (a); + -- query + select * from test where a < 10; + diff --git a/contrib/btree_gist/btree_gist.c b/contrib/btree_gist/btree_gist.c new file mode 100644 index 0000000000..687610ebfc --- /dev/null +++ b/contrib/btree_gist/btree_gist.c @@ -0,0 +1,557 @@ +#include "postgres.h" + +#include "access/gist.h" +#include "access/itup.h" +#include "access/nbtree.h" + +#include "utils/palloc.h" +#include "utils/geo_decls.h" +#include "utils/elog.h" + +typedef int (*CMPFUNC)(const void *a, const void *b); +typedef void (*BINARY_UNION)(Datum*, char*); + +typedef struct intkey { + int4 lower; + int4 upper; +} INT4KEY; + +typedef struct tskey { + Timestamp lower; + Timestamp upper; +} TSKEY; + +/* used for sorting */ +typedef struct rix { + int index; + char *r; +} RIX; + +/* +** int4key in/out +*/ +PG_FUNCTION_INFO_V1(int4key_in); +PG_FUNCTION_INFO_V1(int4key_out); +Datum int4key_in(PG_FUNCTION_ARGS); +Datum int4key_out(PG_FUNCTION_ARGS); + +/* +** tskey in/out +*/ +PG_FUNCTION_INFO_V1(tskey_in); +PG_FUNCTION_INFO_V1(tskey_out); +Datum tskey_in(PG_FUNCTION_ARGS); +Datum tskey_out(PG_FUNCTION_ARGS); + +/* +** int4 ops +*/ +PG_FUNCTION_INFO_V1(gint4_compress); +PG_FUNCTION_INFO_V1(gint4_union); +PG_FUNCTION_INFO_V1(gint4_picksplit); +PG_FUNCTION_INFO_V1(gint4_consistent); +PG_FUNCTION_INFO_V1(gint4_penalty); +PG_FUNCTION_INFO_V1(gint4_same); + +Datum gint4_compress(PG_FUNCTION_ARGS); +Datum gint4_union(PG_FUNCTION_ARGS); +Datum gint4_picksplit(PG_FUNCTION_ARGS); +Datum gint4_consistent(PG_FUNCTION_ARGS); +Datum gint4_penalty(PG_FUNCTION_ARGS); +Datum gint4_same(PG_FUNCTION_ARGS); + +static void gint4_binary_union(Datum *r1, char *r2); +static int int4key_cmp(const void *a, const void *b); + +/* +** timestamp ops +*/ +PG_FUNCTION_INFO_V1(gts_compress); +PG_FUNCTION_INFO_V1(gts_union); +PG_FUNCTION_INFO_V1(gts_picksplit); +PG_FUNCTION_INFO_V1(gts_consistent); +PG_FUNCTION_INFO_V1(gts_penalty); +PG_FUNCTION_INFO_V1(gts_same); + +Datum gts_compress(PG_FUNCTION_ARGS); +Datum gts_union(PG_FUNCTION_ARGS); +Datum gts_picksplit(PG_FUNCTION_ARGS); +Datum gts_consistent(PG_FUNCTION_ARGS); +Datum gts_penalty(PG_FUNCTION_ARGS); +Datum gts_same(PG_FUNCTION_ARGS); + +static void gts_binary_union(Datum *r1, char *r2); +static int tskey_cmp(const void *a, const void *b); + +/* define for comparison */ +#define TSGE( ts1, ts2 ) (DatumGetBool(DirectFunctionCall2( \ + timestamp_ge, \ + PointerGetDatum( ts1 ), \ + PointerGetDatum( ts2 ) \ +))) +#define TSGT( ts1, ts2 ) (DatumGetBool(DirectFunctionCall2( \ + timestamp_gt, \ + PointerGetDatum( ts1 ), \ + PointerGetDatum( ts2 ) \ +))) +#define TSEQ( ts1, ts2 ) (DatumGetBool(DirectFunctionCall2( \ + timestamp_eq, \ + PointerGetDatum( ts1 ), \ + PointerGetDatum( ts2 ) \ +))) +#define TSLT( ts1, ts2 ) (DatumGetBool(DirectFunctionCall2( \ + timestamp_lt, \ + PointerGetDatum( ts1 ), \ + PointerGetDatum( ts2 ) \ +))) +#define TSLE( ts1, ts2 ) (DatumGetBool(DirectFunctionCall2( \ + timestamp_le, \ + PointerGetDatum( ts1 ), \ + PointerGetDatum( ts2 ) \ +))) + +/* +** Common btree-function (for all ops) +*/ +static GIST_SPLITVEC * btree_picksplit(bytea *entryvec, GIST_SPLITVEC *v, + BINARY_UNION bu, CMPFUNC cmp); + +PG_FUNCTION_INFO_V1(btree_decompress); +Datum btree_decompress(PG_FUNCTION_ARGS); + +/************************************************** + * int4 ops + **************************************************/ + +Datum +gint4_compress(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry=(GISTENTRY*)PG_GETARG_POINTER(0); + GISTENTRY *retval; + + if ( entry->leafkey) { + INT4KEY *r = palloc(sizeof(INT4KEY)); + retval = palloc(sizeof(GISTENTRY)); + r->lower = r->upper = (entry->key); + + gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, + entry->offset, sizeof(INT4KEY),FALSE); + + } else { + retval = entry; + } + PG_RETURN_POINTER( retval ); +} + +Datum +gint4_consistent(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); + int4 query = PG_GETARG_INT32(1); + INT4KEY *kkk= (INT4KEY *)DatumGetPointer(entry->key); + StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + bool retval; + + switch(strategy) { + case BTLessEqualStrategyNumber: + retval = ( query >= kkk->lower ); + break; + case BTLessStrategyNumber: + if (GIST_LEAF(entry)) + retval = ( query > kkk->lower ); + else + retval = ( query >= kkk->lower ); + break; + case BTEqualStrategyNumber: + /* in leaf page kkk->lower always = kkk->upper */ + if (GIST_LEAF(entry)) + retval = ( query == kkk->lower ); + else + retval = ( kkk->lower <= query && query <= kkk->upper ); + break; + case BTGreaterStrategyNumber: + if (GIST_LEAF(entry)) + retval = ( query < kkk->upper ); + else + retval = ( query <= kkk->upper ); + break; + case BTGreaterEqualStrategyNumber: + retval = ( query <= kkk->upper ); + break; + default: + retval = FALSE; + } + PG_RETURN_BOOL(retval); +} + +Datum +gint4_union(PG_FUNCTION_ARGS) +{ + bytea *entryvec = (bytea*) PG_GETARG_POINTER(0); + int i, numranges; + INT4KEY *cur, *out=palloc(sizeof(INT4KEY)); + + numranges = (VARSIZE(entryvec) - VARHDRSZ)/sizeof(GISTENTRY); + *(int*) PG_GETARG_POINTER(1) = sizeof(INT4KEY); + + cur = (INT4KEY *)DatumGetPointer( (((GISTENTRY *)(VARDATA(entryvec)))[0].key) ); + out->lower = cur->lower; + out->upper = cur->upper; + + for (i = 1; i < numranges; i++) { + cur = (INT4KEY *)DatumGetPointer( (((GISTENTRY *)(VARDATA(entryvec)))[i].key) ); + if ( out->lower > cur->lower ) out->lower = cur->lower; + if ( out->upper < cur->upper ) out->upper = cur->upper; + } + + PG_RETURN_POINTER( out ); +} + +Datum +gint4_penalty(PG_FUNCTION_ARGS) +{ + INT4KEY *origentry = (INT4KEY*) DatumGetPointer( ((GISTENTRY*) PG_GETARG_POINTER(0))->key ); + INT4KEY *newentry = (INT4KEY*) DatumGetPointer( ((GISTENTRY*) PG_GETARG_POINTER(1))->key ); + float *result = (float*) PG_GETARG_POINTER(2); + + *result = Max( newentry->upper - origentry->upper, 0 ) + + Max( origentry->lower - newentry->lower, 0 ); + + PG_RETURN_POINTER( result ); +} + +Datum +gint4_picksplit(PG_FUNCTION_ARGS) +{ + PG_RETURN_POINTER( btree_picksplit( + (bytea*)PG_GETARG_POINTER(0), + (GIST_SPLITVEC*)PG_GETARG_POINTER(1), + gint4_binary_union, + int4key_cmp + ) ); +} + +Datum +gint4_same(PG_FUNCTION_ARGS) +{ + INT4KEY *b1 = (INT4KEY*) PG_GETARG_POINTER(0); + INT4KEY *b2 = (INT4KEY*) PG_GETARG_POINTER(1); + bool *result = (bool*) PG_GETARG_POINTER(2); + + *result = ( b1->lower == b2->lower && b1->upper == b2->upper ) ? TRUE : FALSE; + PG_RETURN_POINTER(result); +} + +static void +gint4_binary_union(Datum *r1, char *r2) +{ + INT4KEY *b1; + INT4KEY *b2 = (INT4KEY*) r2; + if ( ! DatumGetPointer( *r1 ) ) { + *r1 = PointerGetDatum( palloc( sizeof(INT4KEY) ) ); + b1 = (INT4KEY*)DatumGetPointer( *r1 ); + b1->upper = b2->upper; + b1->lower = b2->lower; + } else { + b1 = (INT4KEY*)DatumGetPointer( *r1 ); + + b1->lower = ( b1->lower > b2->lower ) ? + b2->lower : b1->lower; + b1->upper = ( b1->upper > b2->upper ) ? + b1->upper : b2->upper; + } +} + + +static int +int4key_cmp(const void *a, const void *b) { + return ( ((INT4KEY*)(((RIX*)a)->r))->lower - ((INT4KEY*)(((RIX*)b)->r))->lower ); +} + +/************************************************** + * timestamp ops + **************************************************/ + +Datum +gts_compress(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry=(GISTENTRY*)PG_GETARG_POINTER(0); + GISTENTRY *retval; + + if ( entry->leafkey) { + TSKEY *r = (TSKEY *)palloc( sizeof(TSKEY) ); + retval = palloc(sizeof(GISTENTRY)); + if ( entry->key ) { + r->lower = r->upper = *(Timestamp*)(entry->key); + + gistentryinit(*retval, PointerGetDatum(r), + entry->rel, entry->page, + entry->offset, sizeof(TSKEY), FALSE); + + } else { + gistentryinit(*retval, PointerGetDatum(NULL), + entry->rel, entry->page, + entry->offset, 0, FALSE); + } + } else { + retval = entry; + } + PG_RETURN_POINTER( retval ); +} + +Datum +gts_consistent(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); + Timestamp *query = (Timestamp *)PG_GETARG_POINTER(1); + StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + bool retval; + TSKEY *key; + /* + ** if entry is not leaf, use gbox_internal_consistent, + ** else use gbox_leaf_consistent + */ + if ( ! entry->key ) + return FALSE; + key = (TSKEY*) DatumGetPointer(entry->key); + + switch(strategy) { + case BTLessEqualStrategyNumber: + retval = TSGE( query, &(key->lower) ); + break; + case BTLessStrategyNumber: + if (GIST_LEAF(entry)) + retval = TSGT( query, &(key->lower) ); + else + retval = TSGE( query, &(key->lower) ); + break; + case BTEqualStrategyNumber: + /* in leaf page key->lower always = key->upper */ + if (GIST_LEAF(entry)) + retval = TSEQ( query, &(key->lower)); + else + retval = ( TSLE( &(key->lower), query ) && TSLE( query, &(key->upper) ) ); + break; + case BTGreaterStrategyNumber: + if (GIST_LEAF(entry)) + retval = TSLT( query, &(key->upper) ); + else + retval = TSLE( query, &(key->upper) ); + break; + case BTGreaterEqualStrategyNumber: + retval = TSLE( query, &(key->upper) ); + break; + default: + retval = FALSE; + } + PG_RETURN_BOOL(retval); +} + +Datum +gts_union(PG_FUNCTION_ARGS) +{ + bytea *entryvec = (bytea*) PG_GETARG_POINTER(0); + int i, numranges; + TSKEY *cur, *out=palloc(sizeof(TSKEY)); + + numranges = (VARSIZE(entryvec) - VARHDRSZ)/sizeof(GISTENTRY); + *(int*) PG_GETARG_POINTER(1) = sizeof(TSKEY); + + cur = (TSKEY *)DatumGetPointer( (((GISTENTRY *)(VARDATA(entryvec)))[0].key) ); + out->lower = cur->lower; + out->upper = cur->upper; + + for (i = 1; i < numranges; i++) { + cur = (TSKEY *)DatumGetPointer( (((GISTENTRY *)(VARDATA(entryvec)))[i].key) ); + if ( TSGT( &out->lower, &cur->lower ) ) out->lower = cur->lower; + if ( TSLT( &out->upper, &cur->upper ) ) out->upper = cur->upper; + } + + PG_RETURN_POINTER( out ); +} + +Datum +gts_penalty(PG_FUNCTION_ARGS) +{ + TSKEY *origentry = (TSKEY*) DatumGetPointer( ((GISTENTRY*) PG_GETARG_POINTER(0))->key ); + TSKEY *newentry = (TSKEY*) DatumGetPointer( ((GISTENTRY*) PG_GETARG_POINTER(1))->key ); + float *result = (float*) PG_GETARG_POINTER(2); + Interval *intr; + + intr = DatumGetIntervalP( DirectFunctionCall2( + timestamp_mi, + TimestampGetDatum( newentry->upper ), + TimestampGetDatum( origentry->upper )) ); + + /* see interval_larger */ + *result = Max( intr->time+intr->month * (30.0 * 86400),0 ); + pfree( intr ); + + intr = DatumGetIntervalP( DirectFunctionCall2( + timestamp_mi, + TimestampGetDatum( origentry->lower ), + TimestampGetDatum( newentry->lower )) ); + + /* see interval_larger */ + *result += Max( intr->time+intr->month * (30.0 * 86400),0 ); + pfree( intr ); + + PG_RETURN_POINTER( result ); +} + +Datum +gts_picksplit(PG_FUNCTION_ARGS) +{ + PG_RETURN_POINTER( btree_picksplit( + (bytea*)PG_GETARG_POINTER(0), + (GIST_SPLITVEC*)PG_GETARG_POINTER(1), + gts_binary_union, + tskey_cmp + ) ); +} + +Datum +gts_same(PG_FUNCTION_ARGS) +{ + TSKEY *b1 = (TSKEY*) PG_GETARG_POINTER(0); + TSKEY *b2 = (TSKEY*) PG_GETARG_POINTER(1); + + bool *result = (bool*) PG_GETARG_POINTER(2); + if ( b1 && b2 ) + *result = ( TSEQ( &(b1->lower), &(b2->lower) ) && TSEQ( &(b1->upper), &(b2->upper) ) ) ? TRUE : FALSE; + else + *result = ( b1==NULL && b2==NULL ) ? TRUE : FALSE; + PG_RETURN_POINTER(result); +} + +static void +gts_binary_union(Datum *r1, char *r2) +{ + TSKEY *b1; + TSKEY *b2 = (TSKEY*) r2; + + if ( ! DatumGetPointer( *r1 ) ) { + *r1 = PointerGetDatum( palloc( sizeof(TSKEY) ) ); + b1 = (TSKEY*)DatumGetPointer( *r1 ); + b1->upper = b2->upper; + b1->lower = b2->lower; + } else { + b1 = (TSKEY*)DatumGetPointer( *r1 ); + + b1->lower = ( TSGT( &b1->lower, &b2->lower) ) ? + b2->lower : b1->lower; + b1->upper = ( TSGT( &b1->upper, &b2->upper) ) ? + b1->upper : b2->upper; + } +} + +static int +tskey_cmp(const void *a, const void *b) { + Interval *intr; + float result; + + intr = DatumGetIntervalP( DirectFunctionCall2( + timestamp_mi, + TimestampGetDatum( ((TSKEY*)(((RIX*)a)->r))->lower ), + TimestampGetDatum( ((TSKEY*)(((RIX*)b)->r))->lower )) ); + + /* see interval_larger */ + result = intr->time+intr->month * (30.0 * 86400); + pfree( intr ); + if ( result == 0.0 ) + return 0; + else + return ( result>0 ) ? 1 : 0; +} + +/************************************************** + * Common btree-function (for all ops) + **************************************************/ + +/* +** The GiST PickSplit method +*/ +static GIST_SPLITVEC * +btree_picksplit(bytea *entryvec, GIST_SPLITVEC *v, BINARY_UNION bu, CMPFUNC cmp) +{ + OffsetNumber i; + RIX *array; + OffsetNumber maxoff; + int nbytes; + + maxoff = ((VARSIZE(entryvec) - VARHDRSZ)/sizeof(GISTENTRY)) - 1; + nbytes = (maxoff + 2) * sizeof(OffsetNumber); + v->spl_left = (OffsetNumber *) palloc(nbytes); + v->spl_right = (OffsetNumber *) palloc(nbytes); + v->spl_nleft = 0; + v->spl_nright = 0; + v->spl_ldatum = PointerGetDatum( 0 ); + v->spl_rdatum = PointerGetDatum( 0 ); + array = (RIX*)palloc( sizeof(RIX) * (maxoff+1) ); + + /* copy the data into RIXes, and sort the RIXes */ + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) { + array[i].index = i; + array[i].r=(char *)DatumGetPointer( (((GISTENTRY *)(VARDATA(entryvec)))[i].key) ); + } + qsort((void*)&array[FirstOffsetNumber], maxoff - FirstOffsetNumber + 1, + sizeof(RIX), cmp); + + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) { + if (i <= (maxoff - FirstOffsetNumber + 1)/2) { + v->spl_left[ v->spl_nleft ] = array[i].index; + v->spl_nleft++; + (*bu)( &v->spl_ldatum, array[i].r ); + } else { + v->spl_right[ v->spl_nright ] = array[i].index; + v->spl_nright++; + (*bu)( &v->spl_rdatum, array[i].r ); + } + } + pfree(array); + + return( v ); +} + +/* +** GiST DeCompress methods +** do not do anything. +*/ +Datum +btree_decompress(PG_FUNCTION_ARGS) +{ + PG_RETURN_POINTER(PG_GETARG_POINTER(0)); +} + + +/************************************************** + * In/Out for keys, not really needed + **************************************************/ +Datum +int4key_in(PG_FUNCTION_ARGS) { + INT4KEY *key = palloc(sizeof(INT4KEY)); + + if ( sscanf( PG_GETARG_POINTER(0), "%d|%d", &(key->lower), &(key->upper)) != 2 ) + elog(ERROR, "Error in input format"); + + PG_RETURN_POINTER( key ); +} + +Datum int4key_out(PG_FUNCTION_ARGS) { + INT4KEY *key = (INT4KEY *) PG_GETARG_POINTER(0); + char *str=palloc(sizeof(char)*22); + sprintf(str,"%d|%d", key->lower, key->upper); + PG_RETURN_POINTER( str ); +} + +Datum +tskey_in(PG_FUNCTION_ARGS) { + elog(ERROR, "Not implemented"); + PG_RETURN_POINTER( NULL ); +} + +Datum +tskey_out(PG_FUNCTION_ARGS) { + elog(ERROR, "Not implemented"); + PG_RETURN_POINTER( NULL ); +} diff --git a/contrib/btree_gist/btree_gist.sql.in b/contrib/btree_gist/btree_gist.sql.in new file mode 100644 index 0000000000..7089f1d3b5 --- /dev/null +++ b/contrib/btree_gist/btree_gist.sql.in @@ -0,0 +1,263 @@ +begin transaction; +-- create type of int4 key + +CREATE FUNCTION int4key_in(opaque) +RETURNS opaque +AS 'MODULE_PATHNAME' +LANGUAGE 'c' with (isstrict); + +CREATE FUNCTION int4key_out(opaque) +RETURNS opaque +AS 'MODULE_PATHNAME' +LANGUAGE 'c' with (isstrict); + +CREATE TYPE int4key ( +internallength = 8, +input = int4key_in, +output = int4key_out +); + + +-- +-- +-- +-- int4 ops +-- +-- +-- +-- define the GiST support methods +create function gint4_consistent(opaque,int4,int2) returns bool as 'MODULE_PATHNAME' language 'C'; + +create function gint4_compress(opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +create function btree_decompress(opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +create function gint4_penalty(opaque,opaque,opaque) returns opaque as 'MODULE_PATHNAME' language 'C' with(isstrict); + +create function gint4_picksplit(opaque, opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +create function gint4_union(bytea, opaque) returns int4 as 'MODULE_PATHNAME' language 'C'; + +create function gint4_same(opaque, opaque, opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +-- add a new opclass +INSERT INTO pg_opclass (opcamid, opcname, opcintype, opckeytype, opcdefault) + SELECT pg_am.oid, 'gist_int4_ops', pg_type.oid, pg_key.oid, true + FROM pg_type, pg_am, pg_type pg_key + WHERE pg_type.typname = 'int4' and + pg_key.typname = 'int4key' and + pg_am.amname='gist'; + + +SELECT o.oid AS opoid, o.oprname +INTO TABLE int_ops_tmp +FROM pg_operator o, pg_type t +WHERE o.oprleft = t.oid and o.oprright = t.oid + and t.typname = 'int4'; + +-- get the comparators for int4es and store them in a tmp table +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 1, 'f' + FROM pg_opclass opcl, int_ops_tmp c + WHERE opcname = 'gist_int4_ops' + and c.oprname = '<'; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 2, 'f' + FROM pg_opclass opcl, int_ops_tmp c + WHERE opcname = 'gist_int4_ops' + and c.oprname = '<='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 3, 'f' + FROM pg_opclass opcl, int_ops_tmp c + WHERE opcname = 'gist_int4_ops' + and c.oprname = '='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 4, 'f' + FROM pg_opclass opcl, int_ops_tmp c + WHERE opcname = 'gist_int4_ops' + and c.oprname = '>='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 5, 'f' + FROM pg_opclass opcl, int_ops_tmp c + WHERE opcname = 'gist_int4_ops' + and c.oprname = '>'; + + +DROP table int_ops_tmp; + +-- add the entries to amproc for the support methods +-- note the amprocnum numbers associated with each are specific! +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 1 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_consistent'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 2 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_union'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 3 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_compress'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 4 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'btree_decompress'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 5 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_penalty'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 6 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_picksplit'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 7 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_int4_ops' + and proname = 'gint4_same'; + +-- +-- +-- +-- timestamp ops +-- +-- +-- +-- create type of timestamp key + +CREATE FUNCTION tskey_in(opaque) +RETURNS opaque +AS 'MODULE_PATHNAME' +LANGUAGE 'c' with (isstrict); + +CREATE FUNCTION tskey_out(opaque) +RETURNS opaque +AS 'MODULE_PATHNAME' +LANGUAGE 'c' with (isstrict); + +CREATE TYPE tskey ( +internallength = 16, +input = tskey_in, +output = tskey_out +); + +create function gts_consistent(opaque,timestamp,int2) returns bool as 'MODULE_PATHNAME' language 'C'; + +create function gts_compress(opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +create function gts_penalty(opaque,opaque,opaque) returns opaque as 'MODULE_PATHNAME' language 'C' with(isstrict); + +create function gts_picksplit(opaque, opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +create function gts_union(bytea, opaque) returns int4 as 'MODULE_PATHNAME' language 'C'; + +create function gts_same(opaque, opaque, opaque) returns opaque as 'MODULE_PATHNAME' language 'C'; + +INSERT INTO pg_opclass (opcamid, opcname, opcintype, opckeytype, opcdefault) + SELECT pg_am.oid, 'gist_timestamp_ops', pg_type.oid, pg_key.oid, true + FROM pg_type, pg_am, pg_type pg_key + WHERE pg_type.typname = 'timestamp' and + pg_key.typname = 'tskey' and + pg_am.amname='gist'; + +SELECT o.oid AS opoid, o.oprname +INTO TABLE timestamp_ops_tmp +FROM pg_operator o, pg_type t +WHERE o.oprleft = t.oid and o.oprright = t.oid + and t.typname = 'timestamp'; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 1, 'f' + FROM pg_opclass opcl, timestamp_ops_tmp c + WHERE opcname = 'gist_timestamp_ops' + and c.oprname = '<'; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 2, 'f' + FROM pg_opclass opcl, timestamp_ops_tmp c + WHERE opcname = 'gist_timestamp_ops' + and c.oprname = '<='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 3, 'f' + FROM pg_opclass opcl, timestamp_ops_tmp c + WHERE opcname = 'gist_timestamp_ops' + and c.oprname = '='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 4, 'f' + FROM pg_opclass opcl, timestamp_ops_tmp c + WHERE opcname = 'gist_timestamp_ops' + and c.oprname = '>='; + +INSERT INTO pg_amop (amopclaid, amopopr, amopstrategy, amopreqcheck) + SELECT opcl.oid, c.opoid, 5, 'f' + FROM pg_opclass opcl, timestamp_ops_tmp c + WHERE opcname = 'gist_timestamp_ops' + and c.oprname = '>'; + +DROP table timestamp_ops_tmp; + +-- add the entries to amproc for the support methods +-- note the amprocnum numbers associated with each are specific! +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 1 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_consistent'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 2 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_union'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 3 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_compress'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 4 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'btree_decompress'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 5 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_penalty'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 6 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_picksplit'; + +INSERT INTO pg_amproc (amopclaid, amproc, amprocnum) + SELECT opcl.oid, pro.oid, 7 + FROM pg_opclass opcl, pg_proc pro + WHERE opcname = 'gist_timestamp_ops' + and proname = 'gts_same'; + +end transaction; + diff --git a/contrib/btree_gist/data/test_btree.data b/contrib/btree_gist/data/test_btree.data new file mode 100644 index 0000000000..d29aa02c52 --- /dev/null +++ b/contrib/btree_gist/data/test_btree.data @@ -0,0 +1,1000 @@ +49 +200 +394 +274 +196 +543 +328 +645 +151 +849 +771 +704 +688 +485 +545 +931 +210 +222 +897 +676 +\N +201 +533 +703 +410 +301 +633 +319 +329 +13 +942 +737 +533 +407 +876 +622 +430 +264 +785 +938 +680 +91 +179 +147 +108 +510 +336 +781 +3 +16 +\N +136 +494 +570 +333 +447 +185 +\N +\N +213 +193 +565 +77 +904 +989 +471 +\N +566 +117 +102 +515 +105 +\N +61 +537 +278 +337 +46 +92 +723 +661 +619 +\N +293 +\N +919 +227 +536 +917 +779 +418 +15 +235 +425 +\N +362 +587 +590 +103 +563 +369 +775 +404 +408 +142 +133 +566 +727 +413 +382 +42 +32 +548 +540 +\N +86 +\N +58 +685 +11 +907 +274 +94 +987 +971 +383 +757 +327 +38 +854 +257 +318 +159 +224 +39 +\N +532 +461 +30 +\N +790 +\N +828 +35 +606 +845 +\N +313 +391 +869 +592 +821 +73 +\N +703 +222 +218 +209 +136 +774 +608 +531 +820 +119 +497 +889 +\N +592 +899 +\N +243 +\N +400 +\N +894 +\N +\N +386 +\N +550 +840 +606 +160 +386 +723 +16 +693 +601 +338 +368 +74 +436 +734 +806 +433 +679 +857 +679 +319 +85 +\N +153 +506 +110 +73 +485 +749 +205 +628 +746 +380 +\N +573 +146 +314 +439 +102 +606 +\N +179 +\N +921 +236 +509 +714 +353 +97 +\N +374 +131 +528 +805 +298 +533 +737 +\N +135 +119 +294 +725 +826 +393 +740 +487 +932 +\N +734 +333 +651 +460 +590 +530 +575 +352 +999 +319 +\N +277 +692 +939 +580 +\N +\N +568 +92 +182 +885 +839 +303 +709 +891 +538 +58 +271 +577 +827 +459 +852 +812 +823 +\N +375 +924 +\N +799 +297 +795 +853 +751 +\N +77 +339 +\N +\N +506 +577 +864 +118 +444 +731 +355 +390 +787 +352 +570 +389 +771 +110 +278 +59 +862 +846 +\N +362 +590 +719 +442 +525 +329 +945 +739 +857 +897 +835 +787 +657 +558 +455 +\N +159 +\N +672 +795 +\N +581 +818 +872 +123 +255 +816 +789 +\N +124 +\N +900 +\N +240 +819 +386 +841 +282 +269 +259 +893 +570 +505 +769 +959 +\N +426 +620 +857 +824 +102 +308 +351 +74 +950 +292 +580 +739 +575 +\N +594 +\N +489 +382 +498 +795 +664 +881 +918 +159 +108 +\N +679 +724 +964 +8 +664 +267 +101 +869 +676 +433 +469 +657 +78 +381 +43 +959 +695 +545 +780 +390 +697 +733 +693 +387 +864 +613 +301 +374 +222 +564 +450 +307 +\N +\N +912 +518 +593 +283 +529 +983 +379 +244 +819 +377 +225 +811 +69 +\N +380 +919 +724 +352 +248 +\N +416 +788 +663 +395 +394 +707 +352 +658 +759 +825 +881 +563 +271 +\N +407 +\N +157 +931 +233 +769 +78 +737 +525 +221 +216 +824 +353 +977 +757 +976 +843 +795 +603 +\N +85 +795 +382 +998 +136 +904 +563 +354 +288 +2 +835 +\N +714 +915 +471 +\N +\N +676 +556 +119 +490 +909 +\N +240 +106 +17 +474 +222 +721 +374 +\N +262 +913 +234 +797 +\N +723 +9 +126 +886 +617 +311 +241 +413 +134 +545 +145 +867 +120 +271 +\N +\N +\N +177 +\N +735 +435 +\N +855 +612 +803 +964 +417 +771 +359 +670 +682 +236 +492 +597 +220 +1 +585 +193 +837 +938 +389 +527 +423 +627 +\N +924 +741 +760 +280 +819 +128 +585 +412 +\N +816 +710 +359 +318 +478 +803 +771 +642 +\N +\N +842 +490 +462 +727 +214 +629 +276 +\N +274 +672 +875 +35 +873 +913 +185 +770 +126 +4 +770 +56 +621 +137 +62 +771 +561 +891 +80 +\N +45 +996 +722 +940 +823 +\N +883 +225 +788 +519 +317 +763 +563 +689 +635 +905 +500 +859 +55 +205 +651 +537 +787 +973 +195 +542 +\N +\N +857 +377 +\N +\N +834 +314 +314 +407 +865 +945 +675 +\N +\N +5 +715 +248 +168 +862 +37 +366 +936 +136 +\N +324 +845 +854 +831 +225 +\N +987 +545 +621 +140 +844 +132 +466 +899 +716 +907 +97 +511 +425 +225 +522 +702 +532 +132 +328 +278 +985 +869 +773 +\N +633 +624 +114 +879 +142 +762 +729 +890 +430 +241 +267 +616 +9 +457 +168 +\N +177 +3 +\N +675 +558 +2 +\N +310 +548 +992 +597 +950 +48 +33 +173 +460 +890 +757 +983 +492 +777 +22 +261 +973 +106 +666 +558 +226 +681 +\N +347 +92 +14 +96 +641 +495 +585 +458 +217 +386 +284 +719 +694 +\N +643 +\N +928 +976 +44 +941 +396 +\N +559 +969 +187 +669 +463 +769 +669 +\N +70 +861 +501 +\N +349 +44 +951 +375 +869 +441 +515 +322 +867 +983 +152 +623 +730 +148 +899 +236 +833 +961 +389 +448 +975 +523 +225 +\N +698 +314 +19 +935 +269 +178 +349 +685 +702 +523 +165 +453 +756 +266 +997 +499 +880 +402 +40 +487 +261 +506 +886 +193 +237 +631 +630 +570 +90 +558 +348 +203 +\N +598 +676 +834 +709 +796 +299 +197 +\N +94 +997 +458 +871 +964 +808 +321 +\N +525 +451 +785 +374 +530 +626 +850 +336 +138 +883 +143 +\N +299 +\N +754 +667 +820 +777 +438 +339 +600 +276 +987 +270 +949 +\N +474 +321 +325 +138 +620 +345 +\N +477 +\N +690 +714 +897 +36 +469 +965 +259 +715 +580 +\N +697 +495 +\N +284 +820 +992 +708 +638 +216 +181 +\N +101 +\N +730 +902 +703 +176 +561 +945 +915 +246 +632 +441 +849 +\N +552 +76 +960 +628 +413 +814 +746 +613 +417 +327 +178 +116 +829 +522 +761 +462 +518 +660 +87 +979 +143 +628 +960 +715 +\N +288 +\N +387 +29 +15 +544 +455 +57 +433 +158 +72 +49 +620 +616 +592 +584 +564 +735 +308 +661 +519 +1 +825 +665 +316 +970 +305 +204 +541 +544 +589 +827 +600 +126 +192 +610 +650 +647 +177 +625 +405 +465 +895 +\N +152 +594 +492 +385 +693 +442 +173 +\N +946 +934 +200 +532 +750 +158 +981 +670 +572 +608 +135 +48 +208 +\N +971 +594 +429 +655 diff --git a/contrib/btree_gist/data/test_btree_ts.data b/contrib/btree_gist/data/test_btree_ts.data new file mode 100644 index 0000000000..7dc9a5b0c6 --- /dev/null +++ b/contrib/btree_gist/data/test_btree_ts.data @@ -0,0 +1,1000 @@ +\N +Sun Jun 3 20:40:06 2001 +Sun Jun 3 02:45:19 2001 +Tue May 29 20:31:04 2001 +Fri Jun 1 04:23:33 2001 +Wed May 30 07:38:41 2001 +Sun Jun 3 11:21:57 2001 +Fri Jun 1 01:05:37 2001 +Mon May 28 21:42:37 2001 +Wed May 30 17:54:19 2001 +Mon Jun 4 18:45:50 2001 +Tue May 29 19:55:23 2001 +Tue May 29 12:15:50 2001 +Mon Jun 4 03:14:19 2001 +Tue May 29 08:42:21 2001 +Sun Jun 3 04:31:46 2001 +Tue May 29 15:13:14 2001 +Thu May 31 02:32:09 2001 +Thu May 31 01:12:54 2001 +Tue May 29 16:55:46 2001 +Fri Jun 1 18:01:47 2001 +Mon May 28 22:49:18 2001 +Tue May 29 16:51:44 2001 +Mon Jun 4 07:09:50 2001 +Mon May 28 21:12:17 2001 +Wed May 30 01:17:11 2001 +Thu May 31 02:02:53 2001 +Tue May 29 07:49:47 2001 +Sat Jun 2 16:06:10 2001 +Sun Jun 3 16:18:58 2001 +Tue May 29 03:16:58 2001 +Sat Jun 2 01:36:39 2001 +Sat Jun 2 19:42:28 2001 +Sat Jun 2 03:31:29 2001 +Wed May 30 14:28:07 2001 +Wed May 30 13:48:30 2001 +Sun Jun 3 22:24:38 2001 +Tue May 29 08:47:05 2001 +Mon Jun 4 01:10:50 2001 +Fri Jun 1 21:52:26 2001 +Tue May 29 16:47:26 2001 +Sat Jun 2 18:15:31 2001 +Sat Jun 2 05:56:51 2001 +Sun Jun 3 17:56:22 2001 +Sat Jun 2 11:23:49 2001 +Fri Jun 1 13:25:51 2001 +Wed May 30 22:32:03 2001 +Thu May 31 08:20:54 2001 +\N +Thu May 31 19:03:04 2001 +Fri Jun 1 20:11:05 2001 +Sun Jun 3 20:09:52 2001 +Wed May 30 05:56:53 2001 +Sat Jun 2 02:33:53 2001 +Fri Jun 1 23:33:12 2001 +Mon Jun 4 14:27:14 2001 +Sun Jun 3 07:17:52 2001 +Sat Jun 2 14:44:01 2001 +Wed May 30 16:15:42 2001 +\N +Thu May 31 08:24:36 2001 +Mon Jun 4 17:45:29 2001 +Thu May 31 10:46:18 2001 +Tue May 29 11:21:09 2001 +Sat Jun 2 19:27:48 2001 +Sat Jun 2 15:21:37 2001 +Thu May 31 15:07:29 2001 +Mon Jun 4 04:25:42 2001 +Sun Jun 3 19:21:05 2001 +Wed May 30 01:35:52 2001 +\N +Thu May 31 17:05:54 2001 +Thu May 31 02:22:03 2001 +Wed May 30 10:09:01 2001 +Wed May 30 15:36:50 2001 +Wed May 30 03:13:22 2001 +Tue May 29 19:54:54 2001 +Thu May 31 18:58:16 2001 +Fri Jun 1 11:31:40 2001 +Sat Jun 2 11:01:18 2001 +Wed May 30 10:17:52 2001 +\N +Sat Jun 2 04:07:24 2001 +Sat Jun 2 07:29:24 2001 +Fri Jun 1 03:17:40 2001 +Thu May 31 20:49:55 2001 +Mon Jun 4 08:07:37 2001 +Sat Jun 2 01:17:04 2001 +Wed May 30 19:59:30 2001 +Fri Jun 1 17:03:00 2001 +Thu May 31 22:50:11 2001 +Tue May 29 00:14:32 2001 +Sat Jun 2 06:53:18 2001 +Fri Jun 1 02:19:00 2001 +Tue May 29 15:22:30 2001 +Sun Jun 3 10:08:27 2001 +Wed May 30 18:30:36 2001 +Wed May 30 08:57:25 2001 +Tue May 29 06:59:32 2001 +Wed May 30 06:29:04 2001 +Tue May 29 13:16:29 2001 +Thu May 31 08:24:46 2001 +Thu May 31 20:50:41 2001 +\N +Wed May 30 20:34:27 2001 +Wed May 30 17:14:44 2001 +Tue May 29 13:06:28 2001 +Sun Jun 3 09:49:45 2001 +Thu May 31 11:11:56 2001 +Tue May 29 06:37:34 2001 +Mon May 28 22:38:25 2001 +Sat Jun 2 07:51:04 2001 +\N +Wed May 30 03:53:04 2001 +Tue May 29 00:01:38 2001 +Fri Jun 1 19:23:30 2001 +Thu May 31 08:36:36 2001 +Sun Jun 3 00:04:28 2001 +Thu May 31 02:07:37 2001 +Thu May 31 04:14:15 2001 +Wed May 30 22:23:45 2001 +Mon May 28 22:42:50 2001 +Wed May 30 01:37:14 2001 +Wed May 30 14:03:12 2001 +Sun Jun 3 23:40:54 2001 +Sat Jun 2 14:28:35 2001 +Sat Jun 2 11:48:57 2001 +Mon Jun 4 18:50:42 2001 +Wed May 30 20:56:22 2001 +Sat Jun 2 12:53:46 2001 +\N +Wed May 30 04:14:41 2001 +Thu May 31 02:12:07 2001 +Mon Jun 4 05:52:07 2001 +Fri Jun 1 05:25:34 2001 +Thu May 31 06:19:47 2001 +Mon Jun 4 03:39:58 2001 +Wed May 30 23:59:02 2001 +Sat Jun 2 11:12:50 2001 +Wed May 30 01:51:48 2001 +Sun Jun 3 03:22:55 2001 +Sat Jun 2 23:24:56 2001 +Sun Jun 3 01:37:30 2001 +Sat Jun 2 14:49:14 2001 +Fri Jun 1 09:21:57 2001 +Sun Jun 3 19:08:13 2001 +\N +Wed May 30 17:25:06 2001 +Thu May 31 23:43:31 2001 +Wed May 30 19:30:46 2001 +Sun Jun 3 12:12:08 2001 +Thu May 31 15:20:18 2001 +Thu May 31 22:14:37 2001 +Sun Jun 3 17:26:54 2001 +Wed May 30 18:23:42 2001 +Tue May 29 16:17:51 2001 +Sun Jun 3 02:03:30 2001 +Mon May 28 21:46:57 2001 +Sun Jun 3 15:41:51 2001 +Sat Jun 2 23:10:23 2001 +Tue May 29 02:03:28 2001 +Fri Jun 1 13:40:57 2001 +Sun Jun 3 18:39:05 2001 +Wed May 30 21:55:49 2001 +Thu May 31 23:45:28 2001 +Thu May 31 08:32:38 2001 +Tue May 29 22:11:25 2001 +Wed May 30 02:09:08 2001 +Fri Jun 1 03:04:47 2001 +Mon May 28 21:01:12 2001 +Wed May 30 01:55:13 2001 +\N +Tue May 29 22:52:13 2001 +Wed May 30 01:51:02 2001 +Sun Jun 3 01:34:33 2001 +Wed May 30 15:44:24 2001 +Wed May 30 04:27:54 2001 +Sat Jun 2 20:08:59 2001 +Sat Jun 2 13:11:14 2001 +Sun Jun 3 14:47:03 2001 +Wed May 30 07:41:49 2001 +Tue May 29 05:24:12 2001 +Sat Jun 2 07:03:17 2001 +Thu May 31 08:30:25 2001 +Sun Jun 3 13:48:30 2001 +Wed May 30 11:43:23 2001 +Wed May 30 11:12:01 2001 +Sun Jun 3 09:08:53 2001 +Thu May 31 06:27:12 2001 +Sat Jun 2 02:53:25 2001 +Mon Jun 4 05:23:09 2001 +Sat Jun 2 18:04:07 2001 +\N +Tue May 29 22:54:17 2001 +Sat Jun 2 18:53:11 2001 +Sun Jun 3 23:55:00 2001 +Fri Jun 1 14:56:29 2001 +\N +Sun Jun 3 01:10:21 2001 +Sun Jun 3 13:03:24 2001 +Sat Jun 2 12:44:32 2001 +Tue May 29 05:19:28 2001 +Thu May 31 16:36:01 2001 +Mon Jun 4 15:25:04 2001 +\N +Sun Jun 3 00:58:03 2001 +Thu May 31 10:10:45 2001 +Sun Jun 3 23:10:39 2001 +Thu May 31 17:08:54 2001 +Sat Jun 2 04:44:32 2001 +Mon Jun 4 20:37:32 2001 +Sun Jun 3 14:02:27 2001 +Fri Jun 1 00:15:11 2001 +Wed May 30 19:07:54 2001 +Thu May 31 21:09:07 2001 +Wed May 30 06:43:45 2001 +Thu May 31 17:03:48 2001 +Wed May 30 10:34:25 2001 +Thu May 31 19:30:19 2001 +Wed May 30 03:26:20 2001 +\N +Tue May 29 11:31:43 2001 +Wed May 30 10:41:13 2001 +Sun Jun 3 22:56:30 2001 +Sat Jun 2 11:24:17 2001 +\N +Tue May 29 08:31:26 2001 +Sun Jun 3 07:16:34 2001 +Fri Jun 1 07:03:59 2001 +Thu May 31 04:49:56 2001 +Fri Jun 1 14:39:21 2001 +Sat Jun 2 17:07:43 2001 +Tue May 29 01:49:41 2001 +Fri Jun 1 06:20:26 2001 +Mon Jun 4 05:09:06 2001 +Thu May 31 00:14:27 2001 +Sat Jun 2 17:21:41 2001 +\N +Tue May 29 02:56:39 2001 +Tue May 29 23:27:02 2001 +Mon May 28 23:50:53 2001 +Wed May 30 02:32:23 2001 +Fri Jun 1 12:37:50 2001 +Wed May 30 23:57:32 2001 +Tue May 29 01:50:18 2001 +Mon May 28 22:17:20 2001 +Tue May 29 01:59:52 2001 +Sat Jun 2 18:49:18 2001 +\N +Wed May 30 05:04:26 2001 +Sat Jun 2 19:04:41 2001 +Sun Jun 3 07:07:43 2001 +Thu May 31 12:32:31 2001 +Sat Jun 2 01:24:29 2001 +\N +Wed May 30 19:38:53 2001 +Fri Jun 1 02:48:16 2001 +\N +Wed May 30 16:12:42 2001 +Mon May 28 21:33:51 2001 +Thu May 31 15:02:55 2001 +Sun Jun 3 13:03:45 2001 +Tue May 29 08:44:17 2001 +Wed May 30 21:32:20 2001 +Sun Jun 3 23:50:24 2001 +Tue May 29 00:31:05 2001 +Thu May 31 09:13:07 2001 +Sat Jun 2 11:13:49 2001 +Thu May 31 20:47:16 2001 +Thu May 31 23:08:43 2001 +Wed May 30 11:53:35 2001 +Wed May 30 18:46:04 2001 +Wed May 30 11:35:10 2001 +Wed May 30 02:57:12 2001 +Fri Jun 1 21:02:27 2001 +Sat Jun 2 08:59:07 2001 +\N +Mon Jun 4 11:42:53 2001 +Sun Jun 3 16:53:56 2001 +Tue May 29 17:44:47 2001 +Fri Jun 1 18:51:21 2001 +Sun Jun 3 04:40:51 2001 +Tue May 29 23:47:08 2001 +Fri Jun 1 17:49:14 2001 +Mon Jun 4 09:00:55 2001 +Thu May 31 04:03:50 2001 +Fri Jun 1 12:29:04 2001 +Thu May 31 22:51:45 2001 +Sat Jun 2 03:50:06 2001 +Fri Jun 1 11:15:33 2001 +Sun Jun 3 21:42:22 2001 +Fri Jun 1 20:15:02 2001 +Fri Jun 1 00:28:51 2001 +Tue May 29 03:43:49 2001 +Mon Jun 4 17:44:11 2001 +Sun Jun 3 05:15:34 2001 +Tue May 29 01:38:51 2001 +Thu May 31 15:54:51 2001 +Tue May 29 13:35:33 2001 +Thu May 31 12:27:53 2001 +Thu May 31 01:12:50 2001 +Mon Jun 4 01:07:39 2001 +Fri Jun 1 17:10:46 2001 +Mon Jun 4 00:09:03 2001 +Thu May 31 14:54:00 2001 +Sun Jun 3 02:28:24 2001 +Sat Jun 2 00:26:46 2001 +Fri Jun 1 19:42:57 2001 +Thu May 31 11:55:21 2001 +Fri Jun 1 08:44:49 2001 +Thu May 31 09:32:30 2001 +Thu May 31 22:04:45 2001 +Thu May 31 11:39:08 2001 +Wed May 30 23:20:32 2001 +Mon Jun 4 07:58:17 2001 +\N +Mon Jun 4 15:28:43 2001 +Mon Jun 4 04:26:29 2001 +Wed May 30 03:52:48 2001 +Wed May 30 06:52:21 2001 +Sat Jun 2 13:06:29 2001 +Sun Jun 3 23:04:07 2001 +Sun Jun 3 10:34:38 2001 +Sun Jun 3 02:45:33 2001 +Sun Jun 3 01:43:03 2001 +Wed May 30 11:07:31 2001 +Wed May 30 20:26:35 2001 +Sun Jun 3 18:37:10 2001 +Fri Jun 1 06:53:17 2001 +Thu May 31 21:40:41 2001 +Wed May 30 12:39:25 2001 +Mon Jun 4 16:34:29 2001 +Mon Jun 4 09:50:31 2001 +Sun Jun 3 08:39:42 2001 +Thu May 31 08:03:17 2001 +Wed May 30 11:15:20 2001 +Mon Jun 4 19:43:28 2001 +Sat Jun 2 00:24:36 2001 +Mon Jun 4 01:54:40 2001 +Wed May 30 19:49:56 2001 +Wed May 30 10:53:06 2001 +Mon Jun 4 18:11:15 2001 +Sun Jun 3 01:43:14 2001 +Mon May 28 21:02:47 2001 +\N +Sat Jun 2 01:42:54 2001 +Sat Jun 2 10:15:31 2001 +Thu May 31 15:28:59 2001 +Tue May 29 21:21:39 2001 +Sun Jun 3 20:36:37 2001 +Sun Jun 3 04:50:43 2001 +Fri Jun 1 04:49:37 2001 +Tue May 29 13:13:15 2001 +\N +Fri Jun 1 03:27:34 2001 +Tue May 29 20:30:51 2001 +Wed May 30 23:09:30 2001 +Fri Jun 1 05:11:20 2001 +\N +Sat Jun 2 18:29:35 2001 +Tue May 29 09:21:40 2001 +Mon May 28 23:07:57 2001 +Tue May 29 20:06:18 2001 +Thu May 31 00:36:38 2001 +Tue May 29 11:15:38 2001 +Sun Jun 3 08:41:27 2001 +Wed May 30 19:51:16 2001 +\N +Sat Jun 2 19:50:28 2001 +Sun Jun 3 11:07:04 2001 +Thu May 31 22:56:31 2001 +Thu May 31 02:33:47 2001 +Tue May 29 21:41:08 2001 +Mon Jun 4 20:06:53 2001 +Wed May 30 12:12:35 2001 +Mon May 28 21:05:46 2001 +\N +Fri Jun 1 03:53:06 2001 +Thu May 31 06:10:59 2001 +Sun Jun 3 22:22:20 2001 +Sat Jun 2 08:53:01 2001 +\N +Sun Jun 3 23:03:45 2001 +Wed May 30 04:38:42 2001 +Mon Jun 4 03:47:43 2001 +\N +Wed May 30 13:47:00 2001 +Tue May 29 13:59:04 2001 +Fri Jun 1 08:04:48 2001 +Fri Jun 1 23:10:41 2001 +Sun Jun 3 06:10:43 2001 +Fri Jun 1 09:05:06 2001 +Fri Jun 1 00:58:36 2001 +Wed May 30 23:08:13 2001 +\N +Fri Jun 1 04:39:19 2001 +Tue May 29 05:05:20 2001 +Mon Jun 4 06:34:52 2001 +Mon Jun 4 01:12:51 2001 +Mon Jun 4 19:28:05 2001 +Wed May 30 04:30:02 2001 +Tue May 29 07:06:29 2001 +Mon Jun 4 01:42:10 2001 +Thu May 31 03:47:17 2001 +Sat Jun 2 20:10:24 2001 +Fri Jun 1 13:33:51 2001 +Thu May 31 02:10:40 2001 +Mon Jun 4 11:40:35 2001 +Wed May 30 11:58:20 2001 +Thu May 31 14:21:17 2001 +Fri Jun 1 15:53:58 2001 +Thu May 31 03:15:55 2001 +Sat Jun 2 23:44:52 2001 +Sun Jun 3 06:50:50 2001 +Fri Jun 1 23:37:43 2001 +Wed May 30 04:47:24 2001 +Fri Jun 1 18:37:01 2001 +Mon Jun 4 05:54:07 2001 +Fri Jun 1 05:24:32 2001 +\N +Wed May 30 21:24:31 2001 +Mon Jun 4 07:49:01 2001 +Thu May 31 21:30:47 2001 +Tue May 29 22:04:07 2001 +Tue May 29 20:51:36 2001 +\N +Fri Jun 1 20:47:32 2001 +\N +Wed May 30 18:05:40 2001 +Sun Jun 3 08:32:17 2001 +Mon Jun 4 05:35:49 2001 +Sat Jun 2 17:02:47 2001 +Tue May 29 15:42:04 2001 +Sun Jun 3 03:10:33 2001 +\N +Sat Jun 2 02:57:36 2001 +Mon Jun 4 08:31:49 2001 +Tue May 29 16:46:56 2001 +Mon Jun 4 20:33:33 2001 +Mon Jun 4 09:10:45 2001 +Wed May 30 14:46:43 2001 +\N +Sun Jun 3 05:12:17 2001 +Mon Jun 4 04:12:42 2001 +Sat Jun 2 16:42:20 2001 +Tue May 29 17:29:35 2001 +Tue May 29 16:13:33 2001 +Fri Jun 1 12:46:59 2001 +Thu May 31 11:04:14 2001 +Tue May 29 23:45:19 2001 +\N +Thu May 31 23:42:08 2001 +Mon Jun 4 15:18:56 2001 +Mon Jun 4 20:33:12 2001 +Fri Jun 1 22:20:35 2001 +Wed May 30 12:53:06 2001 +Mon Jun 4 18:29:15 2001 +Sat Jun 2 03:01:22 2001 +\N +Sun Jun 3 04:33:18 2001 +Mon May 28 22:23:42 2001 +Sat Jun 2 05:42:57 2001 +\N +Thu May 31 18:58:14 2001 +Fri Jun 1 17:16:00 2001 +Tue May 29 00:40:26 2001 +Sun Jun 3 09:18:52 2001 +Thu May 31 10:01:25 2001 +Fri Jun 1 08:19:53 2001 +Fri Jun 1 02:15:07 2001 +Thu May 31 11:12:51 2001 +Mon Jun 4 17:36:57 2001 +Mon May 28 21:14:23 2001 +Sun Jun 3 01:10:25 2001 +Wed May 30 22:52:42 2001 +Fri Jun 1 12:41:55 2001 +Sun Jun 3 01:22:21 2001 +Mon Jun 4 00:59:07 2001 +Thu May 31 15:19:57 2001 +Tue May 29 08:47:42 2001 +Tue May 29 06:35:44 2001 +Sun Jun 3 06:41:40 2001 +Fri Jun 1 03:36:12 2001 +Sun Jun 3 06:01:51 2001 +\N +\N +\N +Mon Jun 4 00:35:16 2001 +Sun Jun 3 20:43:44 2001 +Thu May 31 17:03:03 2001 +Sun Jun 3 00:44:32 2001 +Thu May 31 06:26:40 2001 +Mon Jun 4 16:55:01 2001 +Fri Jun 1 23:52:24 2001 +Wed May 30 05:54:54 2001 +Mon Jun 4 01:33:25 2001 +Thu May 31 04:33:42 2001 +Fri Jun 1 03:06:05 2001 +Thu May 31 08:44:54 2001 +Wed May 30 04:50:48 2001 +Thu May 31 23:32:22 2001 +\N +Wed May 30 05:47:17 2001 +Tue May 29 00:14:58 2001 +Wed May 30 16:38:43 2001 +Wed May 30 09:48:16 2001 +Mon Jun 4 07:21:22 2001 +Sat Jun 2 13:18:48 2001 +Thu May 31 01:52:04 2001 +Mon Jun 4 02:11:26 2001 +Sun Jun 3 06:17:29 2001 +Fri Jun 1 14:53:18 2001 +\N +\N +Sun Jun 3 02:05:26 2001 +Sat Jun 2 10:28:04 2001 +Sun Jun 3 04:48:08 2001 +Wed May 30 09:26:19 2001 +Mon May 28 23:34:31 2001 +Sun Jun 3 13:46:32 2001 +Thu May 31 01:07:37 2001 +Sat Jun 2 12:08:18 2001 +\N +Wed May 30 03:40:30 2001 +Tue May 29 18:35:13 2001 +Sun Jun 3 13:56:51 2001 +Fri Jun 1 07:01:52 2001 +Thu May 31 10:31:06 2001 +Fri Jun 1 21:44:46 2001 +Sun Jun 3 00:22:13 2001 +Thu May 31 10:08:26 2001 +Tue May 29 10:49:29 2001 +Fri Jun 1 02:46:00 2001 +Sun Jun 3 02:08:29 2001 +Thu May 31 00:40:41 2001 +Tue May 29 20:26:38 2001 +\N +Wed May 30 04:13:05 2001 +Tue May 29 19:42:52 2001 +Sat Jun 2 08:51:50 2001 +Fri Jun 1 00:02:55 2001 +Mon Jun 4 09:21:49 2001 +\N +Mon May 28 20:47:42 2001 +\N +Sun Jun 3 16:12:38 2001 +Sat Jun 2 12:12:14 2001 +Sat Jun 2 07:08:40 2001 +Sat Jun 2 17:45:38 2001 +Sun Jun 3 10:49:35 2001 +Tue May 29 01:23:15 2001 +Sat Jun 2 09:01:38 2001 +Thu May 31 15:05:25 2001 +Tue May 29 08:02:41 2001 +Thu May 31 16:03:22 2001 +Mon Jun 4 02:21:36 2001 +Thu May 31 09:09:44 2001 +Mon Jun 4 20:33:40 2001 +Fri Jun 1 19:22:33 2001 +Tue May 29 21:46:52 2001 +Tue May 29 16:17:32 2001 +Sun Jun 3 22:54:05 2001 +\N +Sat Jun 2 17:06:31 2001 +Tue May 29 01:23:14 2001 +Fri Jun 1 00:26:49 2001 +Fri Jun 1 08:11:03 2001 +Thu May 31 23:38:11 2001 +Thu May 31 07:24:01 2001 +Mon Jun 4 09:25:23 2001 +Thu May 31 22:13:02 2001 +Sun Jun 3 11:37:32 2001 +Mon Jun 4 03:28:00 2001 +Sun Jun 3 23:43:04 2001 +Thu May 31 03:20:54 2001 +Sun Jun 3 07:29:28 2001 +Fri Jun 1 09:20:51 2001 +Fri Jun 1 03:02:32 2001 +\N +\N +Mon Jun 4 01:20:28 2001 +Tue May 29 17:00:15 2001 +Sun Jun 3 16:37:38 2001 +Thu May 31 15:10:35 2001 +\N +Wed May 30 10:45:33 2001 +Tue May 29 21:35:27 2001 +Thu May 31 11:59:22 2001 +Tue May 29 19:21:17 2001 +Sat Jun 2 02:03:20 2001 +Fri Jun 1 15:22:10 2001 +Sun Jun 3 18:30:25 2001 +Thu May 31 02:06:09 2001 +Tue May 29 14:34:44 2001 +Mon Jun 4 12:25:01 2001 +Tue May 29 00:38:48 2001 +Thu May 31 18:45:03 2001 +Mon Jun 4 04:41:41 2001 +Tue May 29 04:56:23 2001 +Sat Jun 2 16:03:09 2001 +Mon Jun 4 08:55:42 2001 +Sat Jun 2 16:38:42 2001 +\N +\N +Sat Jun 2 00:00:34 2001 +\N +Thu May 31 07:46:00 2001 +Fri Jun 1 08:41:21 2001 +Mon Jun 4 02:31:49 2001 +Wed May 30 03:02:20 2001 +Wed May 30 06:59:57 2001 +Thu May 31 15:19:53 2001 +Sun Jun 3 01:27:16 2001 +Sat Jun 2 01:35:23 2001 +\N +Fri Jun 1 22:27:39 2001 +Sat Jun 2 10:17:13 2001 +Fri Jun 1 13:33:55 2001 +Wed May 30 13:03:05 2001 +Mon Jun 4 11:01:32 2001 +Tue May 29 00:05:35 2001 +Mon Jun 4 00:15:04 2001 +Sat Jun 2 12:17:20 2001 +Sat Jun 2 00:06:55 2001 +Sun Jun 3 20:44:11 2001 +\N +\N +Thu May 31 11:39:15 2001 +Sat Jun 2 19:38:01 2001 +Sat Jun 2 23:25:19 2001 +Thu May 31 18:59:37 2001 +Tue May 29 06:00:36 2001 +Mon Jun 4 10:49:43 2001 +Thu May 31 09:03:07 2001 +Mon Jun 4 03:44:33 2001 +Sun Jun 3 16:48:20 2001 +Sat Jun 2 05:04:30 2001 +Thu May 31 08:15:22 2001 +\N +Mon Jun 4 13:54:06 2001 +Fri Jun 1 08:36:09 2001 +Sat Jun 2 20:22:49 2001 +Mon Jun 4 05:19:25 2001 +Fri Jun 1 10:44:30 2001 +Mon Jun 4 05:06:08 2001 +Sat Jun 2 20:19:29 2001 +Mon Jun 4 17:39:15 2001 +Fri Jun 1 04:16:56 2001 +Fri Jun 1 22:58:31 2001 +Mon Jun 4 20:09:25 2001 +Fri Jun 1 18:14:10 2001 +Sat Jun 2 08:24:33 2001 +Wed May 30 17:45:23 2001 +Sat Jun 2 22:08:54 2001 +Fri Jun 1 11:18:21 2001 +Wed May 30 17:19:04 2001 +Sat Jun 2 17:59:07 2001 +Fri Jun 1 06:34:56 2001 +Thu May 31 00:55:58 2001 +Thu May 31 00:10:09 2001 +Wed May 30 20:06:44 2001 +Sat Jun 2 08:54:43 2001 +Wed May 30 04:25:31 2001 +Sun Jun 3 12:44:50 2001 +Mon Jun 4 00:24:19 2001 +Sun Jun 3 01:54:55 2001 +Fri Jun 1 14:44:14 2001 +Thu May 31 18:06:48 2001 +Sat Jun 2 19:51:22 2001 +Tue May 29 14:51:06 2001 +Thu May 31 07:52:28 2001 +Mon Jun 4 16:15:49 2001 +Thu May 31 14:05:11 2001 +Fri Jun 1 09:37:05 2001 +Sun Jun 3 19:18:03 2001 +Thu May 31 02:47:07 2001 +Tue May 29 12:15:12 2001 +Mon Jun 4 17:54:21 2001 +Wed May 30 01:20:40 2001 +Tue May 29 20:30:46 2001 +\N +Fri Jun 1 20:24:23 2001 +Thu May 31 14:29:57 2001 +Sun Jun 3 15:56:14 2001 +\N +Mon Jun 4 01:08:48 2001 +Fri Jun 1 08:43:00 2001 +Sun Jun 3 02:21:13 2001 +Thu May 31 06:05:35 2001 +Wed May 30 22:01:30 2001 +Tue May 29 11:59:52 2001 +Wed May 30 08:57:11 2001 +Mon May 28 22:45:22 2001 +Fri Jun 1 19:57:26 2001 +Thu May 31 11:37:44 2001 +Wed May 30 15:14:58 2001 +Thu May 31 10:33:26 2001 +Thu May 31 22:22:31 2001 +Thu May 31 12:36:52 2001 +Mon Jun 4 01:59:08 2001 +\N +\N +\N +Tue May 29 10:11:09 2001 +\N +Tue May 29 04:12:23 2001 +Mon Jun 4 05:24:35 2001 +Sat Jun 2 12:10:15 2001 +Thu May 31 07:28:51 2001 +Tue May 29 19:39:54 2001 +Tue May 29 15:29:52 2001 +Fri Jun 1 02:54:21 2001 +Wed May 30 13:39:11 2001 +Sun Jun 3 10:13:42 2001 +Sat Jun 2 13:06:33 2001 +Wed May 30 07:39:12 2001 +\N +Sat Jun 2 17:46:35 2001 +Tue May 29 06:50:13 2001 +Sun Jun 3 16:15:59 2001 +\N +Wed May 30 10:58:14 2001 +Sat Jun 2 04:08:45 2001 +Fri Jun 1 08:04:00 2001 +Wed May 30 20:08:33 2001 +Wed May 30 01:04:38 2001 +Thu May 31 10:27:43 2001 +Sat Jun 2 07:40:34 2001 +Tue May 29 10:01:49 2001 +\N +Mon Jun 4 09:52:34 2001 +Tue May 29 22:03:01 2001 +Fri Jun 1 19:54:17 2001 +Sat Jun 2 09:24:29 2001 +Thu May 31 09:31:38 2001 +\N +Sat Jun 2 22:44:40 2001 +Thu May 31 16:58:45 2001 +Mon Jun 4 17:00:14 2001 +Sun Jun 3 22:08:04 2001 +Wed May 30 07:10:04 2001 +Fri Jun 1 02:48:34 2001 +Wed May 30 09:02:47 2001 +Sat Jun 2 17:37:10 2001 +Mon Jun 4 01:12:25 2001 +Wed May 30 11:30:45 2001 +Tue May 29 01:08:38 2001 +Sun Jun 3 18:00:32 2001 +Sat Jun 2 04:53:59 2001 +Mon Jun 4 16:01:01 2001 +\N +Thu May 31 10:31:19 2001 +Wed May 30 19:04:01 2001 +Thu May 31 07:47:32 2001 +Wed May 30 09:14:45 2001 +Tue May 29 10:25:48 2001 +Mon May 28 21:16:26 2001 +Wed May 30 13:41:26 2001 +Sat Jun 2 05:48:37 2001 +\N +Mon Jun 4 10:39:45 2001 +Thu May 31 21:15:25 2001 +Wed May 30 18:47:04 2001 +Sat Jun 2 18:00:19 2001 +Wed May 30 09:14:11 2001 +Tue May 29 02:50:43 2001 +Sat Jun 2 11:20:26 2001 +Fri Jun 1 20:15:58 2001 +Tue May 29 17:25:43 2001 +Wed May 30 10:26:53 2001 +Tue May 29 22:11:34 2001 +Tue May 29 21:22:11 2001 +Wed May 30 02:21:42 2001 +Sun Jun 3 11:21:58 2001 +\N +Thu May 31 01:51:59 2001 +Fri Jun 1 09:58:13 2001 +\N +Tue May 29 20:14:29 2001 +\N +Sun Jun 3 08:41:19 2001 +Thu May 31 15:43:41 2001 +Mon Jun 4 03:27:28 2001 +Mon Jun 4 07:16:48 2001 +Wed May 30 09:20:24 2001 +Thu May 31 05:15:06 2001 +Wed May 30 22:46:04 2001 +Mon May 28 23:09:17 2001 +Sun Jun 3 08:02:34 2001 +Wed May 30 08:10:27 2001 +Mon Jun 4 18:43:37 2001 +Fri Jun 1 09:47:08 2001 +Thu May 31 09:03:03 2001 +Fri Jun 1 08:00:48 2001 +Wed May 30 03:35:09 2001 +Thu May 31 15:34:51 2001 +Fri Jun 1 09:25:56 2001 +Sun Jun 3 00:12:03 2001 +Sat Jun 2 03:10:27 2001 +Sun Jun 3 01:15:17 2001 +Tue May 29 00:50:57 2001 +Sat Jun 2 11:06:55 2001 +Thu May 31 15:10:57 2001 +Fri Jun 1 19:21:27 2001 +Wed May 30 04:20:23 2001 +Mon Jun 4 06:06:45 2001 +Sat Jun 2 00:26:32 2001 +Thu May 31 18:48:31 2001 +Fri Jun 1 18:06:00 2001 +Thu May 31 22:33:26 2001 +Thu May 31 03:12:30 2001 +Fri Jun 1 18:25:34 2001 +Thu May 31 22:15:49 2001 +Thu May 31 23:51:17 2001 +Fri Jun 1 16:26:23 2001 +Sun Jun 3 01:27:34 2001 +Mon Jun 4 16:41:04 2001 +Tue May 29 02:28:50 2001 +Fri Jun 1 00:04:48 2001 +Sat Jun 2 11:07:09 2001 +Sun Jun 3 19:43:03 2001 +Thu May 31 20:00:50 2001 +Fri Jun 1 04:20:25 2001 +Mon Jun 4 15:06:35 2001 +Sat Jun 2 03:59:59 2001 +\N +Fri Jun 1 15:57:05 2001 +\N +Mon Jun 4 19:09:34 2001 +Sat Jun 2 09:13:53 2001 +Mon Jun 4 10:49:00 2001 +Thu May 31 17:35:02 2001 +Mon May 28 21:33:09 2001 +Sat Jun 2 23:57:28 2001 +Tue May 29 03:02:15 2001 +Thu May 31 13:51:11 2001 +Wed May 30 00:39:37 2001 +Wed May 30 20:21:00 2001 +\N +Wed May 30 08:31:34 2001 +Tue May 29 22:23:46 2001 +Mon Jun 4 13:34:50 2001 +Tue May 29 22:44:31 2001 +Sun Jun 3 01:03:16 2001 +Sat Jun 2 03:35:51 2001 +Thu May 31 21:35:27 2001 +Thu May 31 05:51:43 2001 +Sun Jun 3 23:45:46 2001 +Tue May 29 23:43:03 2001 +Sun Jun 3 08:38:33 2001 +Thu May 31 02:42:18 2001 +Mon Jun 4 00:11:42 2001 +Sun Jun 3 11:45:05 2001 +Sat Jun 2 16:45:14 2001 +\N +Mon Jun 4 14:57:51 2001 +Tue May 29 12:45:16 2001 +Wed May 30 18:55:42 2001 +Sat Jun 2 15:32:50 2001 +Sat Jun 2 18:05:21 2001 +Sat Jun 2 11:17:04 2001 +Tue May 29 17:55:19 2001 +Sat Jun 2 11:01:19 2001 +Sat Jun 2 14:25:20 2001 +Sun Jun 3 06:04:47 2001 +Mon Jun 4 07:17:11 2001 +Sun Jun 3 18:30:47 2001 +Mon Jun 4 17:43:58 2001 +Sat Jun 2 14:50:46 2001 +Wed May 30 05:12:48 2001 +Tue May 29 03:19:28 2001 +\N +Tue May 29 23:52:10 2001 +Wed May 30 20:53:02 2001 +Wed May 30 21:57:59 2001 +Sun Jun 3 13:54:02 2001 +\N +Wed May 30 07:36:16 2001 +Wed May 30 05:23:34 2001 +Tue May 29 15:11:32 2001 +Fri Jun 1 10:34:11 2001 +Sat Jun 2 19:20:29 2001 +Mon May 28 23:29:37 2001 +Tue May 29 05:16:03 2001 +Sun Jun 3 18:30:00 2001 +\N +\N +Sat Jun 2 23:55:01 2001 +\N +\N +Fri Jun 1 22:02:29 2001 +Mon Jun 4 18:36:37 2001 +Fri Jun 1 22:30:27 2001 +Thu May 31 08:35:03 2001 +Tue May 29 23:17:47 2001 +Wed May 30 10:38:34 2001 +Wed May 30 17:38:03 2001 +Tue May 29 20:11:39 2001 +Thu May 31 01:02:00 2001 +Fri Jun 1 00:18:08 2001 +Wed May 30 16:43:19 2001 +Sun Jun 3 06:24:18 2001 +Wed May 30 01:43:00 2001 +Sun Jun 3 18:18:07 2001 +Sat Jun 2 23:46:58 2001 +Sat Jun 2 15:39:12 2001 +Mon May 28 23:32:18 2001 +Fri Jun 1 05:14:51 2001 +Tue May 29 11:56:47 2001 +Tue May 29 08:16:59 2001 +Sat Jun 2 05:26:56 2001 +Fri Jun 1 03:55:01 2001 +Wed May 30 00:59:31 2001 +Thu May 31 05:19:37 2001 +Wed May 30 17:11:22 2001 +\N +Fri Jun 1 06:44:57 2001 +Tue May 29 00:12:11 2001 +Wed May 30 08:40:02 2001 +Sat Jun 2 13:18:32 2001 +Tue May 29 05:29:48 2001 +Tue May 29 04:57:40 2001 +Thu May 31 18:15:39 2001 +Thu May 31 15:54:26 2001 +Sat Jun 2 15:26:32 2001 +Fri Jun 1 01:50:55 2001 +\N +\N +Wed May 30 06:09:02 2001 +Sun Jun 3 08:33:33 2001 +Thu May 31 18:37:41 2001 +Sun Jun 3 03:45:31 2001 +Wed May 30 05:39:36 2001 +Tue May 29 13:26:37 2001 +Sun Jun 3 08:52:50 2001 +Wed May 30 05:31:07 2001 +Mon Jun 4 05:42:06 2001 +\N +Thu May 31 11:08:02 2001 +Mon Jun 4 11:43:38 2001 +Mon Jun 4 16:57:34 2001 +Sun Jun 3 02:27:59 2001 +Sun Jun 3 06:17:20 2001 +Mon Jun 4 16:28:26 2001 +Wed May 30 01:10:30 2001 +Sat Jun 2 20:29:35 2001 +Tue May 29 01:41:22 2001 +Tue May 29 18:25:46 2001 +Tue May 29 23:20:17 2001 +Mon Jun 4 06:25:51 2001 +Sun Jun 3 10:51:58 2001 +Fri Jun 1 04:58:46 2001 +Wed May 30 14:42:19 2001 +\N +Thu May 31 17:27:52 2001 +Thu May 31 22:57:20 2001 +Wed May 30 10:29:59 2001 +Sun Jun 3 16:35:53 2001 +Sat Jun 2 16:59:23 2001 +Wed May 30 05:11:44 2001 +Fri Jun 1 13:47:01 2001 +Mon Jun 4 11:46:01 2001 +Mon Jun 4 02:59:47 2001 +\N +Thu May 31 22:14:50 2001 +\N +Sun Jun 3 12:32:00 2001 +Tue May 29 12:40:55 2001 +Thu May 31 15:03:50 2001 +Thu May 31 10:52:21 2001 +Fri Jun 1 21:57:09 2001 +Sun Jun 3 01:46:18 2001 +Sat Jun 2 22:09:17 2001 +Sat Jun 2 10:02:36 2001 +Fri Jun 1 19:22:54 2001 +Wed May 30 22:10:36 2001 +Sun Jun 3 12:51:15 2001 +Thu May 31 22:15:01 2001 +Sun Jun 3 12:53:11 2001 +Mon Jun 4 12:38:50 2001 +Sun Jun 3 12:32:48 2001 +Mon Jun 4 06:58:26 2001 +Sun Jun 3 16:38:46 2001 +Fri Jun 1 18:25:56 2001 +Sun Jun 3 01:18:29 2001 +Sun Jun 3 06:53:41 2001 +Fri Jun 1 01:21:40 2001 +Fri Jun 1 23:55:58 2001 +Mon Jun 4 06:48:52 2001 +Wed May 30 15:02:56 2001 +Sun Jun 3 09:39:30 2001 +Wed May 30 22:21:37 2001 +Fri Jun 1 02:14:43 2001 +Thu May 31 06:59:11 2001 +Thu May 31 04:29:50 2001 +Mon Jun 4 10:23:29 2001 +Mon Jun 4 17:11:31 2001 +\N +Sun Jun 3 11:03:19 2001 +Fri Jun 1 09:44:07 2001 diff --git a/contrib/btree_gist/expected/btree_gist.out b/contrib/btree_gist/expected/btree_gist.out new file mode 100644 index 0000000000..fdcbfd598a --- /dev/null +++ b/contrib/btree_gist/expected/btree_gist.out @@ -0,0 +1,39 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of seg.sql. +-- +\set ECHO none +create table inttmp (b int4); +\copy inttmp from 'data/test_btree.data' +create table tstmp ( t datetime ); +\copy tstmp from 'data/test_btree_ts.data' +-- without idx +select count(*) from inttmp where b <=10; + count +------- + 11 +(1 row) + +select count(*) from tstmp where t < '2001-05-29 08:33:09+04'; + count +------- + 7 +(1 row) + +-- create idx +create index aaaidx on inttmp using gist ( b ); +create index tsidx on tstmp using gist ( t ); +--with idx +set enable_seqscan=off; +select count(*) from inttmp where b <=10; + count +------- + 11 +(1 row) + +select count(*) from tstmp where t < '2001-05-29 08:33:09+04'; + count +------- + 7 +(1 row) + diff --git a/contrib/btree_gist/sql/btree_gist.sql b/contrib/btree_gist/sql/btree_gist.sql new file mode 100644 index 0000000000..d408105cc7 --- /dev/null +++ b/contrib/btree_gist/sql/btree_gist.sql @@ -0,0 +1,36 @@ +-- +-- first, define the datatype. Turn off echoing so that expected file +-- does not depend on contents of seg.sql. +-- +\set ECHO none +\i btree_gist.sql +\set ECHO all + +create table inttmp (b int4); + +\copy inttmp from 'data/test_btree.data' + +create table tstmp ( t datetime ); + +\copy tstmp from 'data/test_btree_ts.data' + +-- without idx + +select count(*) from inttmp where b <=10; + +select count(*) from tstmp where t < '2001-05-29 08:33:09+04'; + +-- create idx + +create index aaaidx on inttmp using gist ( b ); + +create index tsidx on tstmp using gist ( t ); + +--with idx + +set enable_seqscan=off; + +select count(*) from inttmp where b <=10; + +select count(*) from tstmp where t < '2001-05-29 08:33:09+04'; +