aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_time.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-05-21 12:08:06 +0000
committerNeil Conway <neilc@samurai.com>2005-05-21 12:08:06 +0000
commit36ab6005119532903d4ce3ad564e6576bd7698b8 (patch)
treefb6f1c25a78b5fe285a7496c4893565b76c5893f /contrib/btree_gist/btree_time.c
parent875813439d0659a2adacc54409793a793f959ea7 (diff)
downloadpostgresql-36ab6005119532903d4ce3ad564e6576bd7698b8.tar.gz
postgresql-36ab6005119532903d4ce3ad564e6576bd7698b8.zip
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.
Diffstat (limited to 'contrib/btree_gist/btree_time.c')
-rw-r--r--contrib/btree_gist/btree_time.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c
index c55385ea82d..491d05b631f 100644
--- a/contrib/btree_gist/btree_time.c
+++ b/contrib/btree_gist/btree_time.c
@@ -222,7 +222,6 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
/* see interval_larger */
res = Max(intr->time + intr->month * (30 * 86400), 0);
- pfree(intr);
intr = DatumGetIntervalP(DirectFunctionCall2(
time_mi_time,
@@ -231,7 +230,6 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
/* see interval_larger */
res += Max(intr->time + intr->month * (30 * 86400), 0);
- pfree(intr);
*result = 0.0;
@@ -244,7 +242,6 @@ gbt_time_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);