mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -77,9 +77,6 @@ ltree_compress(PG_FUNCTION_ARGS)
|
||||
key->flag = LTG_ONENODE;
|
||||
memcpy((void *) LTG_NODE(key), (void *) val, val->len);
|
||||
|
||||
if (PointerGetDatum(val) != entry->key)
|
||||
pfree(val);
|
||||
|
||||
retval = (GISTENTRY *) palloc(sizeof(GISTENTRY));
|
||||
gistentryinit(*retval, PointerGetDatum(key),
|
||||
entry->rel, entry->page,
|
||||
@ -432,7 +429,6 @@ ltree_picksplit(PG_FUNCTION_ARGS)
|
||||
else
|
||||
memcpy((void *) LTG_RNODE(ru), (void *) ru_r, ru_r->len);
|
||||
|
||||
pfree(array);
|
||||
v->spl_ldatum = PointerGetDatum(lu);
|
||||
v->spl_rdatum = PointerGetDatum(ru);
|
||||
|
||||
|
Reference in New Issue
Block a user