From 36ab6005119532903d4ce3ad564e6576bd7698b8 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sat, 21 May 2005 12:08:06 +0000 Subject: 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. --- contrib/btree_gist/btree_ts.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'contrib/btree_gist/btree_ts.c') diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index aaa0c2e5a4..3d5defe3db 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -226,7 +226,6 @@ gbt_ts_penalty(PG_FUNCTION_ARGS) #ifdef HAVE_INT64_TIMESTAMP int64 res; - #else double res; #endif @@ -240,7 +239,6 @@ gbt_ts_penalty(PG_FUNCTION_ARGS) /* see interval_larger */ res = Max(intr->time + intr->month * (30 * 86400), 0); - pfree(intr); intr = DatumGetIntervalP(DirectFunctionCall2( timestamp_mi, @@ -250,7 +248,6 @@ gbt_ts_penalty(PG_FUNCTION_ARGS) /* see interval_larger */ res += Max(intr->time + intr->month * (30 * 86400), 0); - pfree(intr); *result = 0.0; @@ -264,11 +261,9 @@ gbt_ts_penalty(PG_FUNCTION_ARGS) *result += FLT_MIN; *result += (float) (res / ((double) (res + intr->time + intr->month * (30 * 86400)))); *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1)); - pfree(intr); } PG_RETURN_POINTER(result); - } -- cgit v1.2.1