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

@ -97,16 +97,12 @@ gbt_bytea_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;
bool retval;
GBT_VARKEY_R r = gbt_var_key_readable(key);
retval = gbt_var_consistent(&r, query, &strategy, GIST_LEAF(entry), &tinfo);
if (qtst != query)
pfree(query);
PG_RETURN_BOOL(retval);
}