15#define NEXTVAL(x) ( (lquery*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) )
16#define ISEQ(a,b) ( (a)->numlevel == (b)->numlevel && ltree_compare(a,b)==0 )
26 errmsg(
"cannot accept a value of type %s",
"ltree_gist")));
36 errmsg(
"cannot display a value of type %s",
"ltree_gist")));
66 if (!right || left == right ||
ISEQ(left, right))
91#define GETENTRY(vec,pos) ((ltree_gist *) DatumGetPointer((vec)->vector[(pos)].key))
228 ((
unsigned char *) base)[
i] |=
sc[
i];
245 if (((
unsigned char *) base)[
i] != 0xff)
289 ((
const RIX *)
b)->r);
355 ((
unsigned char *)
ls)[
i] |=
sc[
i];
376 ((
unsigned char *) rs)[
i] |=
sc[
i];
387 if (((
unsigned char *)
ls)[
i] != 0xff)
400 if (((
unsigned char *) rs)[
i] != 0xff)
527 while (
an > 0 &&
bn > 0)
532 if (
al->len !=
bl->len)
533 return al->len -
bl->len;
600 errmsg(
"array must be one-dimensional")));
604 errmsg(
"array must not contain nulls")));
716 elog(
ERROR,
"unrecognized StrategyNumber: %d", strategy);
742 "signature length in bytes",
#define PG_GETARG_ARRAYTYPE_P(n)
bool array_contains_nulls(const ArrayType *array)
int ArrayGetNItems(int ndim, const int *dims)
#define Assert(condition)
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 DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_POINTER(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 HASHVAL(val, siglen)
#define HASH(sign, val, siglen)
Datum lt_q_regex(PG_FUNCTION_ARGS)
Datum ltq_regex(PG_FUNCTION_ARGS)
bool inner_isparent(const ltree *c, const ltree *p)
#define DatumGetLtreeP(X)
#define FLG_CANLOOKSIGN(x)
#define PG_GETARG_LTXTQUERY_P(n)
PGDLLEXPORT Datum ltxtq_exec(PG_FUNCTION_ARGS)
#define LTG_RNODE(x, siglen)
#define PG_GETARG_LQUERY_P(n)
#define LTG_GETRNODE(x, siglen)
int ltree_compare(const ltree *a, const ltree *b)
#define LTREE_GET_SIGLEN()
bool ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool(*chkcond)(void *checkval, ITEM *val))
#define PG_GETARG_LTREE_P_COPY(n)
#define LQL_CANLOOKSIGN(x)
#define LTREE_SIGLEN_DEFAULT
#define LTG_LNODE(x, siglen)
#define PG_GETARG_LTREE_P(n)
#define LTG_GETLNODE(x, siglen)
Datum ltree_same(PG_FUNCTION_ARGS)
Datum ltree_picksplit(PG_FUNCTION_ARGS)
static bool gist_qe(ltree_gist *key, lquery *query, int siglen)
Datum ltree_union(PG_FUNCTION_ARGS)
Datum ltree_gist_options(PG_FUNCTION_ARGS)
Datum ltree_compress(PG_FUNCTION_ARGS)
static void hashing(BITVECP sign, ltree *t, int siglen)
static bool gist_ischild(ltree_gist *key, ltree *query, int siglen)
static int gist_tqcmp(ltree *t, lquery *q)
static void ltree_gist_relopts_validator(void *parsed_options, relopt_value *vals, int nvals)
#define GETENTRY(vec, pos)
Datum ltree_penalty(PG_FUNCTION_ARGS)
static bool gist_qtxt(ltree_gist *key, ltxtquery *query, int siglen)
Datum ltree_gist_in(PG_FUNCTION_ARGS)
Datum ltree_gist_out(PG_FUNCTION_ARGS)
static bool gist_between(ltree_gist *key, lquery *query, int siglen)
static bool arrq_cons(ltree_gist *key, ArrayType *_query, int siglen)
static bool gist_isparent(ltree_gist *key, ltree *query, int siglen)
Datum ltree_decompress(PG_FUNCTION_ARGS)
static int treekey_cmp(const void *a, const void *b)
static bool checkcondition_bit(void *cxt, ITEM *val)
Datum ltree_consistent(PG_FUNCTION_ARGS)
static ltree * copy_ltree(ltree *src)
ltree_gist * ltree_gist_alloc(bool isalltrue, BITVECP sign, int siglen, ltree *left, ltree *right)
void pfree(void *pointer)
void * palloc0(Size size)
#define OffsetNumberNext(offsetNumber)
#define FirstOffsetNumber
#define qsort(a, b, c, d)
static bool DatumGetBool(Datum X)
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 register_reloptions_validator(local_relopts *relopts, relopts_validator validator)
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)
#define BTGreaterStrategyNumber
#define BTLessStrategyNumber
#define BTEqualStrategyNumber
#define BTLessEqualStrategyNumber
#define BTGreaterEqualStrategyNumber
static Size VARSIZE(const void *PTR)
static void SET_VARSIZE(void *PTR, Size len)