6 #include "access/gist.h"
7 #include "access/itup.h"
8 #include "utils/elog.h"
9 #include "utils/palloc.h"
10 #include "utils/builtins.h"
11 #include "storage/bufpage.h"
29 #define HSHRDSIZE (2*sizeof(int4))
30 #define CALCDATASIZE(x, lenstr) ( (x) * sizeof(HEntry) + HSHRDSIZE + (lenstr) )
31 #define ARRPTR(x) ( (HEntry*) ( (char*)(x) + HSHRDSIZE ) )
32 #define STRPTR(x) ( (char*)(x) + HSHRDSIZE + ( sizeof(HEntry) * ((HStore*)x)->size ) )
35 #define PG_GETARG_HS(x) ((HStore*)PG_DETOAST_DATUM(PG_GETARG_DATUM(x)))
46 int comparePairs(const void *a, const void *b);
47 int uniquePairs(Pairs * a, int4 l, int4 *buflen);