15 #define GETENTRY(vec,pos) ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key))
35 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
36 errmsg(
"cannot accept a value of type %s",
"intbig_gkey")));
45 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
46 errmsg(
"cannot display a value of type %s",
"intbig_gkey")));
193 if ((
sign[
i] & 0xff) != 0xff)
225 diff = (
unsigned char) (
a[
i] ^
b[
i]);
277 for (
i = 0;
i < entryvec->
n;
i++)
349 maxoff = entryvec->
n - 2;
360 if (size_waste > waste)
374 if (seed_1 == 0 || seed_2 == 0)
391 costvector[
j - 1].
pos =
j;
393 size_alpha =
hemdist(datum_l, _j, siglen);
394 size_beta =
hemdist(datum_r, _j, siglen);
395 costvector[
j - 1].
cost = abs(size_alpha - size_beta);
402 for (k = 0; k < maxoff; k++)
404 j = costvector[k].
pos;
411 else if (
j == seed_2)
418 size_alpha =
hemdist(datum_l, _j, siglen);
419 size_beta =
hemdist(datum_r, _j, siglen);
426 memset(union_l, 0xff, siglen);
432 union_l[
i] |= ptr[
i];
442 memset(union_r, 0xff, siglen);
448 union_r[
i] |= ptr[
i];
511 HASH(dq, *ptr, siglen);
555 HASH(dq, *ptr, siglen);
593 "signature length in bytes",
bool signconsistent(QUERYTYPE *query, BITVECP sign, int siglen, bool calcnot)
#define BooleanSearchStrategy
Datum g_intbig_consistent(PG_FUNCTION_ARGS)
static int hemdist(GISTTYPE *a, GISTTYPE *b, int siglen)
static int32 sizebitvec(BITVECP sign, int siglen)
static int hemdistsign(BITVECP a, BITVECP b, int siglen)
Datum _intbig_in(PG_FUNCTION_ARGS)
static GISTTYPE * _intbig_alloc(bool allistrue, int siglen, BITVECP sign)
#define GETENTRY(vec, pos)
Datum g_intbig_compress(PG_FUNCTION_ARGS)
Datum g_intbig_decompress(PG_FUNCTION_ARGS)
static int32 unionkey(BITVECP sbase, GISTTYPE *add, int siglen)
PG_FUNCTION_INFO_V1(g_intbig_consistent)
Datum _intbig_out(PG_FUNCTION_ARGS)
Datum g_intbig_same(PG_FUNCTION_ARGS)
static bool _intbig_overlap(GISTTYPE *a, ArrayType *b, int siglen)
Datum g_intbig_union(PG_FUNCTION_ARGS)
Datum g_intbig_picksplit(PG_FUNCTION_ARGS)
Datum g_intbig_penalty(PG_FUNCTION_ARGS)
Datum g_intbig_options(PG_FUNCTION_ARGS)
static bool _intbig_contains(GISTTYPE *a, ArrayType *b, int siglen)
static int comparecost(const void *a, const void *b)
#define PG_GETARG_ARRAYTYPE_P(n)
#define DatumGetArrayTypeP(X)
static void PGresult * res
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_UINT16(n)
#define PG_RETURN_DATUM(x)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
#define gistentryinit(e, k, r, pg, o, l)
#define HASHVAL(val, siglen)
#define CALCGTSIZE(flag, siglen)
#define SIGLENBIT(siglen)
#define HASH(sign, val, siglen)
static int pg_cmp_s32(int32 a, int32 b)
void pfree(void *pointer)
void * palloc0(Size size)
#define OffsetNumberNext(offsetNumber)
#define FirstOffsetNumber
PGDLLIMPORT const uint8 pg_number_of_ones[256]
static uint64 pg_popcount(const char *buf, int bytes)
#define qsort(a, b, c, d)
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
void init_local_reloptions(local_relopts *relopts, Size relopt_struct_size)
void add_local_int_reloption(local_relopts *relopts, const char *name, const char *desc, int default_val, int min_val, int max_val, int offset)
static pg_noinline void Size size
#define RTOldContainsStrategyNumber
#define RTOverlapStrategyNumber
#define RTSameStrategyNumber
#define RTContainsStrategyNumber
#define RTOldContainedByStrategyNumber
#define RTContainedByStrategyNumber
#define SET_VARSIZE(PTR, len)