/* define for comparison */
static bool
-gbt_bitgt(const void *a, const void *b, Oid collation)
+gbt_bitgt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(bitgt,
PointerGetDatum(a),
}
static bool
-gbt_bitge(const void *a, const void *b, Oid collation)
+gbt_bitge(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(bitge,
PointerGetDatum(a),
}
static bool
-gbt_biteq(const void *a, const void *b, Oid collation)
+gbt_biteq(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(biteq,
PointerGetDatum(a),
}
static bool
-gbt_bitle(const void *a, const void *b, Oid collation)
+gbt_bitle(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(bitle,
PointerGetDatum(a),
}
static bool
-gbt_bitlt(const void *a, const void *b, Oid collation)
+gbt_bitlt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(bitlt,
PointerGetDatum(a),
}
static int32
-gbt_bitcmp(const void *a, const void *b, Oid collation)
+gbt_bitcmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetInt32(DirectFunctionCall2(byteacmp,
PointerGetDatum(a),
static GBT_VARKEY *
-gbt_bit_l2n(GBT_VARKEY *leaf)
+gbt_bit_l2n(GBT_VARKEY *leaf, FmgrInfo *flinfo)
{
GBT_VARKEY *out = leaf;
GBT_VARKEY_R r = gbt_var_key_readable(leaf);
if (GIST_LEAF(entry))
retval = gbt_var_consistent(&r, query, strategy, PG_GET_COLLATION(),
- TRUE, &tinfo);
+ TRUE, &tinfo, fcinfo->flinfo);
else
{
bytea *q = gbt_bit_xfrm((bytea *) query);
retval = gbt_var_consistent(&r, q, strategy, PG_GET_COLLATION(),
- FALSE, &tinfo);
+ FALSE, &tinfo, fcinfo->flinfo);
}
PG_RETURN_BOOL(retval);
}
int32 *size = (int *) PG_GETARG_POINTER(1);
PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1);
gbt_var_picksplit(entryvec, v, PG_GET_COLLATION(),
- &tinfo);
+ &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(v);
}
Datum d2 = PG_GETARG_DATUM(1);
bool *result = (bool *) PG_GETARG_POINTER(2);
- *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo);
+ *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
float *result = (float *) PG_GETARG_POINTER(2);
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
/* define for comparison */
static bool
-gbt_byteagt(const void *a, const void *b, Oid collation)
+gbt_byteagt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(byteagt,
PointerGetDatum(a),
}
static bool
-gbt_byteage(const void *a, const void *b, Oid collation)
+gbt_byteage(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(byteage,
PointerGetDatum(a),
}
static bool
-gbt_byteaeq(const void *a, const void *b, Oid collation)
+gbt_byteaeq(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(byteaeq,
PointerGetDatum(a),
}
static bool
-gbt_byteale(const void *a, const void *b, Oid collation)
+gbt_byteale(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(byteale,
PointerGetDatum(a),
}
static bool
-gbt_bytealt(const void *a, const void *b, Oid collation)
+gbt_bytealt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(bytealt,
PointerGetDatum(a),
}
static int32
-gbt_byteacmp(const void *a, const void *b, Oid collation)
+gbt_byteacmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetInt32(DirectFunctionCall2(byteacmp,
PointerGetDatum(a),
*recheck = false;
retval = gbt_var_consistent(&r, query, strategy, PG_GET_COLLATION(),
- GIST_LEAF(entry), &tinfo);
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo);
PG_RETURN_BOOL(retval);
}
int32 *size = (int *) PG_GETARG_POINTER(1);
PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1);
gbt_var_picksplit(entryvec, v, PG_GET_COLLATION(),
- &tinfo);
+ &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(v);
}
Datum d2 = PG_GETARG_DATUM(1);
bool *result = (bool *) PG_GETARG_POINTER(2);
- *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo);
+ *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
float *result = (float *) PG_GETARG_POINTER(2);
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
/* define for comparison */
static bool
-gbt_numeric_gt(const void *a, const void *b, Oid collation)
+gbt_numeric_gt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(numeric_gt,
PointerGetDatum(a),
}
static bool
-gbt_numeric_ge(const void *a, const void *b, Oid collation)
+gbt_numeric_ge(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(numeric_ge,
PointerGetDatum(a),
}
static bool
-gbt_numeric_eq(const void *a, const void *b, Oid collation)
+gbt_numeric_eq(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(numeric_eq,
PointerGetDatum(a),
}
static bool
-gbt_numeric_le(const void *a, const void *b, Oid collation)
+gbt_numeric_le(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(numeric_le,
PointerGetDatum(a),
}
static bool
-gbt_numeric_lt(const void *a, const void *b, Oid collation)
+gbt_numeric_lt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2(numeric_lt,
PointerGetDatum(a),
}
static int32
-gbt_numeric_cmp(const void *a, const void *b, Oid collation)
+gbt_numeric_cmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetInt32(DirectFunctionCall2(numeric_cmp,
PointerGetDatum(a),
*recheck = false;
retval = gbt_var_consistent(&r, query, strategy, PG_GET_COLLATION(),
- GIST_LEAF(entry), &tinfo);
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo);
PG_RETURN_BOOL(retval);
}
int32 *size = (int *) PG_GETARG_POINTER(1);
PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
Datum d2 = PG_GETARG_DATUM(1);
bool *result = (bool *) PG_GETARG_POINTER(2);
- *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo);
+ *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
rk = gbt_var_key_readable(org);
uni = PointerGetDatum(gbt_var_key_copy(&rk));
- gbt_var_bin_union(&uni, newe, PG_GET_COLLATION(), &tinfo);
+ gbt_var_bin_union(&uni, newe, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo);
ok = gbt_var_key_readable(org);
uk = gbt_var_key_readable((GBT_VARKEY *) DatumGetPointer(uni));
GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1);
gbt_var_picksplit(entryvec, v, PG_GET_COLLATION(),
- &tinfo);
+ &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(v);
}
/* define for comparison */
static bool
-gbt_textgt(const void *a, const void *b, Oid collation)
+gbt_textgt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2Coll(text_gt,
collation,
}
static bool
-gbt_textge(const void *a, const void *b, Oid collation)
+gbt_textge(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2Coll(text_ge,
collation,
}
static bool
-gbt_texteq(const void *a, const void *b, Oid collation)
+gbt_texteq(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2Coll(texteq,
collation,
}
static bool
-gbt_textle(const void *a, const void *b, Oid collation)
+gbt_textle(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2Coll(text_le,
collation,
}
static bool
-gbt_textlt(const void *a, const void *b, Oid collation)
+gbt_textlt(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetBool(DirectFunctionCall2Coll(text_lt,
collation,
}
static int32
-gbt_textcmp(const void *a, const void *b, Oid collation)
+gbt_textcmp(const void *a, const void *b, Oid collation, FmgrInfo *flinfo)
{
return DatumGetInt32(DirectFunctionCall2Coll(bttextcmp,
collation,
}
retval = gbt_var_consistent(&r, query, strategy, PG_GET_COLLATION(),
- GIST_LEAF(entry), &tinfo);
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo);
PG_RETURN_BOOL(retval);
}
}
retval = gbt_var_consistent(&r, trim, strategy, PG_GET_COLLATION(),
- GIST_LEAF(entry), &tinfo);
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo);
PG_RETURN_BOOL(retval);
}
int32 *size = (int *) PG_GETARG_POINTER(1);
PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1);
gbt_var_picksplit(entryvec, v, PG_GET_COLLATION(),
- &tinfo);
+ &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(v);
}
Datum d2 = PG_GETARG_DATUM(1);
bool *result = (bool *) PG_GETARG_POINTER(2);
- *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo);
+ *result = gbt_var_same(d1, d2, PG_GET_COLLATION(), &tinfo, fcinfo->flinfo);
PG_RETURN_POINTER(result);
}
float *result = (float *) PG_GETARG_POINTER(2);
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
{
const gbtree_vinfo *tinfo;
Oid collation;
+ FmgrInfo *flinfo;
} gbt_vsrt_arg;
static GBT_VARKEY *
-gbt_var_leaf2node(GBT_VARKEY *leaf, const gbtree_vinfo *tinfo)
+gbt_var_leaf2node(GBT_VARKEY *leaf, const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
GBT_VARKEY *out = leaf;
if (tinfo->f_l2n)
- out = (*tinfo->f_l2n) (leaf);
+ out = (*tinfo->f_l2n) (leaf, flinfo);
return out;
}
void
gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
- const gbtree_vinfo *tinfo)
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
GBT_VARKEY_R eo = gbt_var_key_readable(e);
GBT_VARKEY_R nr;
{
GBT_VARKEY *tmp;
- tmp = gbt_var_leaf2node(e, tinfo);
+ tmp = gbt_var_leaf2node(e, tinfo, flinfo);
if (tmp != e)
eo = gbt_var_key_readable(tmp);
}
nr.lower = ro.lower;
nr.upper = ro.upper;
- if ((*tinfo->f_cmp) (ro.lower, eo.lower, collation) > 0)
+ if ((*tinfo->f_cmp) (ro.lower, eo.lower, collation, flinfo) > 0)
{
nr.lower = eo.lower;
update = true;
}
- if ((*tinfo->f_cmp) (ro.upper, eo.upper, collation) < 0)
+ if ((*tinfo->f_cmp) (ro.upper, eo.upper, collation, flinfo) < 0)
{
nr.upper = eo.upper;
update = true;
GBT_VARKEY *
gbt_var_union(const GistEntryVector *entryvec, int32 *size, Oid collation,
- const gbtree_vinfo *tinfo)
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
int i = 0,
numranges = entryvec->n;
for (i = 1; i < numranges; i++)
{
cur = (GBT_VARKEY *) DatumGetPointer(entryvec->vector[i].key);
- gbt_var_bin_union(&out, cur, collation, tinfo);
+ gbt_var_bin_union(&out, cur, collation, tinfo, flinfo);
}
bool
gbt_var_same(Datum d1, Datum d2, Oid collation,
- const gbtree_vinfo *tinfo)
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
GBT_VARKEY *t1 = (GBT_VARKEY *) DatumGetPointer(d1);
GBT_VARKEY *t2 = (GBT_VARKEY *) DatumGetPointer(d2);
r1 = gbt_var_key_readable(t1);
r2 = gbt_var_key_readable(t2);
- return ((*tinfo->f_cmp) (r1.lower, r2.lower, collation) == 0 &&
- (*tinfo->f_cmp) (r1.upper, r2.upper, collation) == 0);
+ return ((*tinfo->f_cmp) (r1.lower, r2.lower, collation, flinfo) == 0 &&
+ (*tinfo->f_cmp) (r1.upper, r2.upper, collation, flinfo) == 0);
}
float *
gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
- Oid collation, const gbtree_vinfo *tinfo)
+ Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
GBT_VARKEY *orge = (GBT_VARKEY *) DatumGetPointer(o->key);
GBT_VARKEY *newe = (GBT_VARKEY *) DatumGetPointer(n->key);
{
GBT_VARKEY *tmp;
- tmp = gbt_var_leaf2node(newe, tinfo);
+ tmp = gbt_var_leaf2node(newe, tinfo, flinfo);
if (tmp != newe)
nk = gbt_var_key_readable(tmp);
}
if ((VARSIZE(ok.lower) - VARHDRSZ) == 0 && (VARSIZE(ok.upper) - VARHDRSZ) == 0)
*res = 0.0;
- else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation) >= 0 ||
+ else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation, flinfo) >= 0 ||
gbt_bytea_pf_match(ok.lower, nk.lower, tinfo)) &&
- ((*tinfo->f_cmp) (nk.upper, ok.upper, collation) <= 0 ||
+ ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
{
Datum d = PointerGetDatum(0);
int32 ol,
ul;
- gbt_var_bin_union(&d, orge, collation, tinfo);
+ gbt_var_bin_union(&d, orge, collation, tinfo, flinfo);
ol = gbt_var_node_cp_len((GBT_VARKEY *) DatumGetPointer(d), tinfo);
- gbt_var_bin_union(&d, newe, collation, tinfo);
+ gbt_var_bin_union(&d, newe, collation, tinfo, flinfo);
ul = gbt_var_node_cp_len((GBT_VARKEY *) DatumGetPointer(d), tinfo);
if (ul < ol)
const gbt_vsrt_arg *varg = (const gbt_vsrt_arg *) arg;
int res;
- res = (*varg->tinfo->f_cmp) (ar.lower, br.lower, varg->collation);
+ res = (*varg->tinfo->f_cmp) (ar.lower, br.lower, varg->collation, varg->flinfo);
if (res == 0)
- return (*varg->tinfo->f_cmp) (ar.upper, br.upper, varg->collation);
+ return (*varg->tinfo->f_cmp) (ar.upper, br.upper, varg->collation, varg->flinfo);
return res;
}
GIST_SPLITVEC *
gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
- Oid collation, const gbtree_vinfo *tinfo)
+ Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo)
{
OffsetNumber i,
maxoff = entryvec->n - 1;
ro = gbt_var_key_readable((GBT_VARKEY *) cur);
if (ro.lower == ro.upper) /* leaf */
{
- sv[svcntr] = gbt_var_leaf2node((GBT_VARKEY *) cur, tinfo);
+ sv[svcntr] = gbt_var_leaf2node((GBT_VARKEY *) cur, tinfo, flinfo);
arr[i].t = sv[svcntr];
if (sv[svcntr] != (GBT_VARKEY *) cur)
svcntr++;
/* sort */
varg.tinfo = tinfo;
varg.collation = collation;
+ varg.flinfo = flinfo;
qsort_arg((void *) &arr[FirstOffsetNumber],
maxoff - FirstOffsetNumber + 1,
sizeof(Vsrt),
{
if (i <= (maxoff - FirstOffsetNumber + 1) / 2)
{
- gbt_var_bin_union(&v->spl_ldatum, arr[i].t, collation, tinfo);
+ gbt_var_bin_union(&v->spl_ldatum, arr[i].t, collation, tinfo, flinfo);
v->spl_left[v->spl_nleft] = arr[i].i;
v->spl_nleft++;
}
else
{
- gbt_var_bin_union(&v->spl_rdatum, arr[i].t, collation, tinfo);
+ gbt_var_bin_union(&v->spl_rdatum, arr[i].t, collation, tinfo, flinfo);
v->spl_right[v->spl_nright] = arr[i].i;
v->spl_nright++;
}
StrategyNumber strategy,
Oid collation,
bool is_leaf,
- const gbtree_vinfo *tinfo)
+ const gbtree_vinfo *tinfo,
+ FmgrInfo *flinfo)
{
bool retval = FALSE;
{
case BTLessEqualStrategyNumber:
if (is_leaf)
- retval = (*tinfo->f_ge) (query, key->lower, collation);
+ retval = (*tinfo->f_ge) (query, key->lower, collation, flinfo);
else
- retval = (*tinfo->f_cmp) (query, key->lower, collation) >= 0
+ retval = (*tinfo->f_cmp) (query, key->lower, collation, flinfo) >= 0
|| gbt_var_node_pf_match(key, query, tinfo);
break;
case BTLessStrategyNumber:
if (is_leaf)
- retval = (*tinfo->f_gt) (query, key->lower, collation);
+ retval = (*tinfo->f_gt) (query, key->lower, collation, flinfo);
else
- retval = (*tinfo->f_cmp) (query, key->lower, collation) >= 0
+ retval = (*tinfo->f_cmp) (query, key->lower, collation, flinfo) >= 0
|| gbt_var_node_pf_match(key, query, tinfo);
break;
case BTEqualStrategyNumber:
if (is_leaf)
- retval = (*tinfo->f_eq) (query, key->lower, collation);
+ retval = (*tinfo->f_eq) (query, key->lower, collation, flinfo);
else
retval =
- ((*tinfo->f_cmp) (key->lower, query, collation) <= 0 &&
- (*tinfo->f_cmp) (query, key->upper, collation) <= 0) ||
+ ((*tinfo->f_cmp) (key->lower, query, collation, flinfo) <= 0 &&
+ (*tinfo->f_cmp) (query, key->upper, collation, flinfo) <= 0) ||
gbt_var_node_pf_match(key, query, tinfo);
break;
case BTGreaterStrategyNumber:
if (is_leaf)
- retval = (*tinfo->f_lt) (query, key->upper, collation);
+ retval = (*tinfo->f_lt) (query, key->upper, collation, flinfo);
else
- retval = (*tinfo->f_cmp) (query, key->upper, collation) <= 0
+ retval = (*tinfo->f_cmp) (query, key->upper, collation, flinfo) <= 0
|| gbt_var_node_pf_match(key, query, tinfo);
break;
case BTGreaterEqualStrategyNumber:
if (is_leaf)
- retval = (*tinfo->f_le) (query, key->upper, collation);
+ retval = (*tinfo->f_le) (query, key->upper, collation, flinfo);
else
- retval = (*tinfo->f_cmp) (query, key->upper, collation) <= 0
+ retval = (*tinfo->f_cmp) (query, key->upper, collation, flinfo) <= 0
|| gbt_var_node_pf_match(key, query, tinfo);
break;
case BtreeGistNotEqualStrategyNumber:
- retval = !((*tinfo->f_eq) (query, key->lower, collation) &&
- (*tinfo->f_eq) (query, key->upper, collation));
+ retval = !((*tinfo->f_eq) (query, key->lower, collation, flinfo) &&
+ (*tinfo->f_eq) (query, key->upper, collation, flinfo));
break;
default:
retval = FALSE;
/* Methods */
- bool (*f_gt) (const void *, const void *, Oid); /* greater than */
- bool (*f_ge) (const void *, const void *, Oid); /* greater equal */
- bool (*f_eq) (const void *, const void *, Oid); /* equal */
- bool (*f_le) (const void *, const void *, Oid); /* less equal */
- bool (*f_lt) (const void *, const void *, Oid); /* less than */
- int32 (*f_cmp) (const void *, const void *, Oid); /* compare */
- GBT_VARKEY *(*f_l2n) (GBT_VARKEY *); /* convert leaf to node */
+ bool (*f_gt) (const void *, const void *, Oid, FmgrInfo *); /* greater than */
+ bool (*f_ge) (const void *, const void *, Oid, FmgrInfo *); /* greater equal */
+ bool (*f_eq) (const void *, const void *, Oid, FmgrInfo *); /* equal */
+ bool (*f_le) (const void *, const void *, Oid, FmgrInfo *); /* less equal */
+ bool (*f_lt) (const void *, const void *, Oid, FmgrInfo *); /* less than */
+ int32 (*f_cmp) (const void *, const void *, Oid, FmgrInfo *); /* compare */
+ GBT_VARKEY *(*f_l2n) (GBT_VARKEY *, FmgrInfo *flinfo); /* convert leaf to node */
} gbtree_vinfo;
extern GISTENTRY *gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo);
extern GBT_VARKEY *gbt_var_union(const GistEntryVector *entryvec, int32 *size,
- Oid collation, const gbtree_vinfo *tinfo);
+ Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
extern bool gbt_var_same(Datum d1, Datum d2, Oid collation,
- const gbtree_vinfo *tinfo);
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
extern float *gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
- Oid collation, const gbtree_vinfo *tinfo);
+ Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
extern bool gbt_var_consistent(GBT_VARKEY_R *key, const void *query,
StrategyNumber strategy, Oid collation, bool is_leaf,
- const gbtree_vinfo *tinfo);
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
extern GIST_SPLITVEC *gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
- Oid collation, const gbtree_vinfo *tinfo);
+ Oid collation, const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
extern void gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
- const gbtree_vinfo *tinfo);
+ const gbtree_vinfo *tinfo, FmgrInfo *flinfo);
#endif