26#define GETENTRY(vec,pos) ((ltree_gist *) DatumGetPointer((vec)->vector[(pos)].key))
27#define NEXTVAL(x) ( (ltree*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) )
29#define WISH_F(a,b,c) (double)( -(double)(((a)-(b))*((a)-(b))*((a)-(b)))*(c) )
65 errmsg(
"array must be one-dimensional")));
69 errmsg(
"array must not contain nulls")));
93 if ((
sign[
i] & 0xff) != 0xff)
325 for (k = 0; k < maxoff; k++)
487 errmsg(
"array must be one-dimensional")));
491 errmsg(
"array must not contain nulls")));
495 if (
gist_qe(key, query, siglen))
540 elog(
ERROR,
"unrecognized StrategyNumber: %d", strategy);
static bool gist_qe(ltree_gist *key, lquery *query, int siglen)
static bool _arrq_cons(ltree_gist *key, ArrayType *_query, int siglen)
static bool gist_te(ltree_gist *key, ltree *query, int siglen)
static void hashing(BITVECP sign, ltree *t, int siglen)
static int32 sizebitvec(BITVECP sign, int siglen)
static int hemdistsign(BITVECP a, BITVECP b, int siglen)
Datum _ltree_union(PG_FUNCTION_ARGS)
#define GETENTRY(vec, pos)
Datum _ltree_penalty(PG_FUNCTION_ARGS)
static bool gist_qtxt(ltree_gist *key, ltxtquery *query, int siglen)
static int hemdist(ltree_gist *a, ltree_gist *b, int siglen)
static int32 unionkey(BITVECP sbase, ltree_gist *add, int siglen)
struct LtreeSignature LtreeSignature
Datum _ltree_gist_options(PG_FUNCTION_ARGS)
static bool checkcondition_bit(void *cxt, ITEM *val)
Datum _ltree_compress(PG_FUNCTION_ARGS)
Datum _ltree_consistent(PG_FUNCTION_ARGS)
Datum _ltree_same(PG_FUNCTION_ARGS)
Datum _ltree_picksplit(PG_FUNCTION_ARGS)
static int comparecost(const void *a, const void *b)
#define DatumGetArrayTypeP(X)
bool array_contains_nulls(const ArrayType *array)
int ArrayGetNItems(int ndim, const int *dims)
unsigned int ltree_crc32_sz(const char *buf, int size)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define palloc_array(type, count)
#define PG_FREE_IF_COPY(ptr, n)
#define PG_GETARG_POINTER(n)
#define PG_GETARG_DATUM(n)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_GETARG_UINT16(n)
#define PG_DETOAST_DATUM(datum)
#define PG_RETURN_POINTER(x)
#define PG_RETURN_BOOL(x)
#define gistentryinit(e, k, r, pg, o, l)
#define FLG_CANLOOKSIGN(x)
#define AHASHVAL(val, siglen)
#define LTREE_GET_ASIGLEN()
#define ASIGLENBIT(siglen)
#define LTREE_ASIGLEN_MAX
#define ALOOPBYTE(siglen)
bool ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool(*chkcond)(void *checkval, ITEM *val))
#define LQL_CANLOOKSIGN(x)
#define AHASH(sign, val, siglen)
ltree_gist * ltree_gist_alloc(bool isalltrue, BITVECP sign, int siglen, ltree *left, ltree *right)
#define LTREE_ASIGLEN_DEFAULT
#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)
static unsigned hash(unsigned *uv, int n)
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 Size VARSIZE(const void *PTR)
static void SET_VARSIZE(void *PTR, Size len)