diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-02-23 14:04:43 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-02-23 14:04:43 -0500 |
commit | b9d092c962ea3262930e3c31a8c3d79b66ce9d43 (patch) | |
tree | dce85c309787c766f079c627b7f06fb5f284495b /contrib/btree_gist | |
parent | d28aafb6dda326688e2f042c95c93ea57963c03c (diff) | |
download | postgresql-b9d092c962ea3262930e3c31a8c3d79b66ce9d43.tar.gz postgresql-b9d092c962ea3262930e3c31a8c3d79b66ce9d43.zip |
Remove now-dead code for !HAVE_INT64_TIMESTAMP.
This is a basically mechanical removal of #ifdef HAVE_INT64_TIMESTAMP
tests and the negative-case controlled code.
Discussion: https://postgr.es/m/26788.1487455319@sss.pgh.pa.us
Diffstat (limited to 'contrib/btree_gist')
-rw-r--r-- | contrib/btree_gist/btree_time.c | 8 | ||||
-rw-r--r-- | contrib/btree_gist/btree_ts.c | 8 | ||||
-rw-r--r-- | contrib/btree_gist/btree_utils_num.h | 7 |
3 files changed, 0 insertions, 23 deletions
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c index 27f30bc1123..959b282b0d1 100644 --- a/contrib/btree_gist/btree_time.c +++ b/contrib/btree_gist/btree_time.c @@ -179,11 +179,7 @@ gbt_timetz_compress(PG_FUNCTION_ARGS) retval = palloc(sizeof(GISTENTRY)); /* We are using the time + zone only to compress */ -#ifdef HAVE_INT64_TIMESTAMP tmp = tz->time + (tz->zone * INT64CONST(1000000)); -#else - tmp = (tz->time + tz->zone); -#endif r->lower = r->upper = tmp; gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, @@ -259,11 +255,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS) /* All cases served by this function are inexact */ *recheck = true; -#ifdef HAVE_INT64_TIMESTAMP qqq = query->time + (query->zone * INT64CONST(1000000)); -#else - qqq = (query->time + query->zone); -#endif key.lower = (GBT_NUMKEY *) &kkk->lower; key.upper = (GBT_NUMKEY *) &kkk->upper; diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index ab22b271d33..68177d2784a 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -153,11 +153,7 @@ ts_dist(PG_FUNCTION_ARGS) p->day = INT_MAX; p->month = INT_MAX; -#ifdef HAVE_INT64_TIMESTAMP p->time = PG_INT64_MAX; -#else - p->time = DBL_MAX; -#endif PG_RETURN_INTERVAL_P(p); } else @@ -181,11 +177,7 @@ tstz_dist(PG_FUNCTION_ARGS) p->day = INT_MAX; p->month = INT_MAX; -#ifdef HAVE_INT64_TIMESTAMP p->time = PG_INT64_MAX; -#else - p->time = DBL_MAX; -#endif PG_RETURN_INTERVAL_P(p); } diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index a33491bc090..67d4968ba7b 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -82,17 +82,10 @@ typedef struct * (as a double). Here because we need it for time/timetz as well as * interval. See interval_cmp_internal for comparison. */ -#ifdef HAVE_INT64_TIMESTAMP #define INTERVAL_TO_SEC(ivp) \ (((double) (ivp)->time) / ((double) USECS_PER_SEC) + \ (ivp)->day * (24.0 * SECS_PER_HOUR) + \ (ivp)->month * (30.0 * SECS_PER_DAY)) -#else -#define INTERVAL_TO_SEC(ivp) \ - ((ivp)->time + \ - (ivp)->day * (24.0 * SECS_PER_HOUR) + \ - (ivp)->month * (30.0 * SECS_PER_DAY)) -#endif #define GET_FLOAT_DISTANCE(t, arg1, arg2) Abs( ((float8) *((const t *) (arg1))) - ((float8) *((const t *) (arg2))) ) |