aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_bytea.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/btree_gist/btree_bytea.c')
-rw-r--r--contrib/btree_gist/btree_bytea.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c
index 2d2169412ee..79095fc0e9d 100644
--- a/contrib/btree_gist/btree_bytea.c
+++ b/contrib/btree_gist/btree_bytea.c
@@ -97,7 +97,7 @@ gbt_bytea_consistent(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
- void *qtst = (void *) DatumGetPointer(PG_GETARG_DATUM(1));
+ void *qtst = (void *) PG_GETARG_POINTER(1);
void *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
bool retval = FALSE;
@@ -146,9 +146,9 @@ gbt_bytea_same(PG_FUNCTION_ARGS)
Datum
gbt_bytea_penalty(PG_FUNCTION_ARGS)
{
- float *result = (float *) PG_GETARG_POINTER(2);
GISTENTRY *o = (GISTENTRY *) PG_GETARG_POINTER(0);
GISTENTRY *n = (GISTENTRY *) PG_GETARG_POINTER(1);
+ float *result = (float *) PG_GETARG_POINTER(2);
PG_RETURN_POINTER(gbt_var_penalty(result, o, n, &tinfo));
}