summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/btree_gist/btree_time.c')
-rw-r--r--contrib/btree_gist/btree_time.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c
index 90cf6554eae..fd8774a2f08 100644
--- a/contrib/btree_gist/btree_time.c
+++ b/contrib/btree_gist/btree_time.c
@@ -216,9 +216,8 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &query, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
Datum
@@ -234,9 +233,8 @@ gbt_time_distance(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_FLOAT8(
- gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+ &tinfo, fcinfo->flinfo));
}
Datum
@@ -260,9 +258,8 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
key.lower = (GBT_NUMKEY *) &kkk->lower;
key.upper = (GBT_NUMKEY *) &kkk->upper;
- PG_RETURN_BOOL(
- gbt_num_consistent(&key, (void *) &qqq, &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
- );
+ PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+ GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
}
@@ -287,15 +284,13 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
double res;
double res2;
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(newentry->upper),
TimeADTGetDatumFast(origentry->upper)));
res = INTERVAL_TO_SEC(intr);
res = Max(res, 0);
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(origentry->lower),
TimeADTGetDatumFast(newentry->lower)));
res2 = INTERVAL_TO_SEC(intr);
@@ -307,8 +302,7 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
if (res > 0)
{
- intr = DatumGetIntervalP(DirectFunctionCall2(
- time_mi_time,
+ intr = DatumGetIntervalP(DirectFunctionCall2(time_mi_time,
TimeADTGetDatumFast(origentry->upper),
TimeADTGetDatumFast(origentry->lower)));
*result += FLT_MIN;
@@ -323,11 +317,9 @@ gbt_time_penalty(PG_FUNCTION_ARGS)
Datum
gbt_time_picksplit(PG_FUNCTION_ARGS)
{
- PG_RETURN_POINTER(gbt_num_picksplit(
- (GistEntryVector *) PG_GETARG_POINTER(0),
+ PG_RETURN_POINTER(gbt_num_picksplit((GistEntryVector *) PG_GETARG_POINTER(0),
(GIST_SPLITVEC *) PG_GETARG_POINTER(1),
- &tinfo, fcinfo->flinfo
- ));
+ &tinfo, fcinfo->flinfo));
}
Datum