summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_bytea.c
diff options
context:
space:
mode:
authorAndrew Dunstan2017-03-21 13:53:35 +0000
committerAndrew Dunstan2017-03-21 14:43:27 +0000
commit65a9138b9b66b2c915619344ca56f4f0d531ada7 (patch)
treefcce4a12069e2e3462a43b20ce8f840dffac3be1 /contrib/btree_gist/btree_bytea.c
parent4b1c68d63e8651094cfe0631682acd999652ea70 (diff)
Use CallerFInfoFunctionCall with btree_gist for varlena types
Follow up to commit 393bb504d7 which did this for numeric types.
Diffstat (limited to 'contrib/btree_gist/btree_bytea.c')
-rw-r--r--contrib/btree_gist/btree_bytea.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c
index df6c960ce59..00753e7f489 100644
--- a/contrib/btree_gist/btree_bytea.c
+++ b/contrib/btree_gist/btree_bytea.c
@@ -23,7 +23,7 @@ PG_FUNCTION_INFO_V1(gbt_bytea_same);
/* 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),
@@ -31,7 +31,7 @@ gbt_byteagt(const void *a, const void *b, Oid collation)
}
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),
@@ -39,7 +39,7 @@ gbt_byteage(const void *a, const void *b, Oid collation)
}
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),
@@ -47,7 +47,7 @@ gbt_byteaeq(const void *a, const void *b, Oid collation)
}
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),
@@ -55,7 +55,7 @@ gbt_byteale(const void *a, const void *b, Oid collation)
}
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),
@@ -63,7 +63,7 @@ gbt_bytealt(const void *a, const void *b, Oid collation)
}
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),
@@ -118,7 +118,7 @@ gbt_bytea_consistent(PG_FUNCTION_ARGS)
*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);
}
@@ -131,7 +131,7 @@ gbt_bytea_union(PG_FUNCTION_ARGS)
int32 *size = (int *) PG_GETARG_POINTER(1);
PG_RETURN_POINTER(gbt_var_union(entryvec, size, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}
@@ -142,7 +142,7 @@ gbt_bytea_picksplit(PG_FUNCTION_ARGS)
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);
}
@@ -153,7 +153,7 @@ gbt_bytea_same(PG_FUNCTION_ARGS)
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);
}
@@ -166,5 +166,5 @@ gbt_bytea_penalty(PG_FUNCTION_ARGS)
float *result = (float *) PG_GETARG_POINTER(2);
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, PG_GET_COLLATION(),
- &tinfo));
+ &tinfo, fcinfo->flinfo));
}