1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Cleanup of GiST extensions in contrib/: now that we always invoke GiST

methods in a short-lived memory context, there is no need for GiST methods
to do their own manual (and error-prone) memory management.
This commit is contained in:
Neil Conway
2005-05-21 12:08:06 +00:00
parent 875813439d
commit 36ab600511
16 changed files with 18 additions and 174 deletions

View File

@ -127,7 +127,6 @@ gbt_bit_consistent(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
GBT_VARKEY *key = (GBT_VARKEY *) DatumGetPointer(entry->key);
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;
@ -140,11 +139,7 @@ gbt_bit_consistent(PG_FUNCTION_ARGS)
bytea *q = gbt_bit_xfrm((bytea *) query);
retval = gbt_var_consistent(&r, (void *) q, &strategy, FALSE, &tinfo);
pfree(q);
}
if (qtst != query)
pfree(query);
PG_RETURN_BOOL(retval);
}