reltime_abatement.patch.1
application/octet-stream
Filename: reltime_abatement.patch.1
Type: application/octet-stream
Part: 0
diff --git a/src/backend/access/hash/hashvalidate.c b/src/backend/access/hash/hashvalidate.c
index 30b29cb..e7a28b0 100644
--- a/src/backend/access/hash/hashvalidate.c
+++ b/src/backend/access/hash/hashvalidate.c
@@ -292,7 +292,7 @@ check_hash_func_signature(Oid funcid, Oid restype, Oid argtype)
*/
if (funcid == F_HASHINT4 &&
(argtype == DATEOID ||
- argtype == ABSTIMEOID || argtype == RELTIMEOID ||
+ argtype == ABSTIMEOID ||
argtype == XIDOID || argtype == CIDOID))
/* okay, allowed use of hashint4() */ ;
else if (funcid == F_TIMESTAMP_HASH &&
diff --git a/src/backend/po/de.po b/src/backend/po/de.po
index 30d589a..9a43c1f 100644
--- a/src/backend/po/de.po
+++ b/src/backend/po/de.po
@@ -20594,11 +20594,6 @@ msgstr "ungültiger Zeitzonenname: »%s«"
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "kann »abstime«-Wert »invalid« nicht »timestamp« umwandeln"
-#: utils/adt/nabstime.c:852
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "kann »reltime«-Wert »invalid« nicht in »interval« umwandeln"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/es.po b/src/backend/po/es.po
index 66be186..24b9f69 100644
--- a/src/backend/po/es.po
+++ b/src/backend/po/es.po
@@ -21160,11 +21160,6 @@ msgstr "nombre de huso horario no válido: «%s»"
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "no se puede convertir el valor reservado de abstime «invalid» a timestamp"
-#: utils/adt/nabstime.c:852
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "no se puede convertir el reltime «invalid» a interval"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/fr.po b/src/backend/po/fr.po
index 4763830..1a760ac 100644
--- a/src/backend/po/fr.po
+++ b/src/backend/po/fr.po
@@ -19564,11 +19564,6 @@ msgstr "nom du fuseau horaire invalide : « %s »"
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "ne peut pas convertir un abstime « invalid » en timestamp"
-#: utils/adt/nabstime.c:855
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "ne peut pas convertir reltime « invalid » en interval"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/id.po b/src/backend/po/id.po
index dfdbbc2..166576b 100644
--- a/src/backend/po/id.po
+++ b/src/backend/po/id.po
@@ -15760,11 +15760,6 @@ msgstr "nama zona waktu tidak valid: « %s »"
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "tidak dapat mengkonversi abstime « invalid » ke timestamp"
-#: utils/adt/nabstime.c:881
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "tidak dapat mengkonversi reltime « invalid » ke interval"
-
#: utils/adt/network.c:118
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/it.po b/src/backend/po/it.po
index 21135e6..fd789db 100644
--- a/src/backend/po/it.po
+++ b/src/backend/po/it.po
@@ -20609,11 +20609,6 @@ msgstr "il nome del fuso orario \"%s\" non è valido"
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "non è possibile convertire il valore abstime \"invalid\" in timestamp"
-#: utils/adt/nabstime.c:852
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "non è possibile convertire il valore reltime \"invalid\" in interval"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/ja.po b/src/backend/po/ja.po
index 8bdb383..fc8b1e2 100644
--- a/src/backend/po/ja.po
+++ b/src/backend/po/ja.po
@@ -16505,11 +16505,6 @@ msgstr "時間帯名称が無効です: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "abstimeの\"invalid\"をtimestampに変換できません"
-#: utils/adt/nabstime.c:881
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "reltimeの\"invalid\"をintervalに変換できません"
-
#: utils/adt/network.c:118
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/ko.po b/src/backend/po/ko.po
index 9a4e045..2e908ee 100644
--- a/src/backend/po/ko.po
+++ b/src/backend/po/ko.po
@@ -20131,11 +20131,6 @@ msgstr "잘못된 타임존 이름: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "\"invalid\" abstime 자료형을 timestamp 자료형으로 변환할 수 없습니다."
-#: utils/adt/nabstime.c:855
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "reltime \"invalid\"를 interval로 변환할 수 없음"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/pl.po b/src/backend/po/pl.po
index 2162abf..3e77e68 100644
--- a/src/backend/po/pl.po
+++ b/src/backend/po/pl.po
@@ -21418,11 +21418,6 @@ msgstr "nieprawidłowa nazwa strefy czasowej: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "nie można przekształcić abstime \"invalid\" do znacznika czasu"
-#: utils/adt/nabstime.c:852
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "nie można przekształcić reltime \"invalid\" do interwału"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/pt_BR.po b/src/backend/po/pt_BR.po
index b3ae6fc..3b3c1ee 100644
--- a/src/backend/po/pt_BR.po
+++ b/src/backend/po/pt_BR.po
@@ -17283,11 +17283,6 @@ msgstr "nome de zona horária é inválido: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "não pode converter abstime \"invalid\" para timestamp"
-#: utils/adt/nabstime.c:855
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "não pode converter reltime \"invalid\" em interval"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index ca435ee..c11fb05 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -22472,11 +22472,6 @@ msgstr "неверное название часового пояса: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "преобразовать значение \"invalid\" типа abstime в timestamp нельзя"
-#: utils/adt/nabstime.c:852
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "преобразовать значение \"invalid\" типа reltime в interval нельзя"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/po/zh_CN.po b/src/backend/po/zh_CN.po
index c5cc4b2..fdf033e 100644
--- a/src/backend/po/zh_CN.po
+++ b/src/backend/po/zh_CN.po
@@ -20229,11 +20229,6 @@ msgstr "无效时区名字: \"%s\""
msgid "cannot convert abstime \"invalid\" to timestamp"
msgstr "无法把 abstime \"invalid\" 转换为 timestamp."
-#: utils/adt/nabstime.c:855
-#, c-format
-msgid "cannot convert reltime \"invalid\" to interval"
-msgstr "无法把 reltime \"invalid\" 转换为 interval"
-
#: utils/adt/network.c:69
#, c-format
msgid "invalid cidr value: \"%s\""
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index c6fa81e..c048010 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -2,7 +2,6 @@
*
* nabstime.c
* Utilities for the built-in type "AbsoluteTime".
- * Functions for the built-in type "RelativeTime".
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@@ -37,8 +36,6 @@
* for these 4-byte types.
*/
-#define IsSpace(C) ((C) == ' ')
-
#define ABSTIMEMIN(t1, t2) \
(DatumGetBool(DirectFunctionCall2(abstimele, \
AbsoluteTimeGetDatum(t1), \
@@ -54,7 +51,6 @@
*/
static AbsoluteTime tm2abstime(struct pg_tm *tm, int tz);
-static void reltime2tm(RelativeTime time, struct pg_tm *tm);
/*
* GetCurrentAbsoluteTime()
@@ -554,239 +550,10 @@ abstime_timestamptz(PG_FUNCTION_ARGS)
PG_RETURN_TIMESTAMP(result);
}
-
-/*****************************************************************************
- * USER I/O ROUTINES *
- *****************************************************************************/
-
-/*
- * reltimein - converts a reltime string in an internal format
- */
-Datum
-reltimein(PG_FUNCTION_ARGS)
-{
- char *str = PG_GETARG_CSTRING(0);
- RelativeTime result;
- struct pg_tm tt,
- *tm = &tt;
- fsec_t fsec;
- int dtype;
- int dterr;
- char *field[MAXDATEFIELDS];
- int nf,
- ftype[MAXDATEFIELDS];
- char workbuf[MAXDATELEN + 1];
-
- dterr = ParseDateTime(str, workbuf, sizeof(workbuf),
- field, ftype, MAXDATEFIELDS, &nf);
- if (dterr == 0)
- dterr = DecodeInterval(field, ftype, nf, INTERVAL_FULL_RANGE,
- &dtype, tm, &fsec);
-
- /* if those functions think it's a bad format, try ISO8601 style */
- if (dterr == DTERR_BAD_FORMAT)
- dterr = DecodeISO8601Interval(str,
- &dtype, tm, &fsec);
-
- if (dterr != 0)
- {
- if (dterr == DTERR_FIELD_OVERFLOW)
- dterr = DTERR_INTERVAL_OVERFLOW;
- DateTimeParseError(dterr, str, "reltime");
- }
-
- switch (dtype)
- {
- case DTK_DELTA:
- result = ((tm->tm_hour * MINS_PER_HOUR + tm->tm_min) * SECS_PER_MINUTE) + tm->tm_sec;
- result += tm->tm_year * SECS_PER_YEAR + ((tm->tm_mon * DAYS_PER_MONTH) + tm->tm_mday) * SECS_PER_DAY;
- break;
-
- default:
- elog(ERROR, "unexpected dtype %d while parsing reltime \"%s\"",
- dtype, str);
- result = INVALID_RELTIME;
- break;
- }
-
- PG_RETURN_RELATIVETIME(result);
-}
-
-/*
- * reltimeout - converts the internal format to a reltime string
- */
-Datum
-reltimeout(PG_FUNCTION_ARGS)
-{
- RelativeTime time = PG_GETARG_RELATIVETIME(0);
- char *result;
- struct pg_tm tt,
- *tm = &tt;
- char buf[MAXDATELEN + 1];
-
- reltime2tm(time, tm);
- EncodeInterval(tm, 0, IntervalStyle, buf);
-
- result = pstrdup(buf);
- PG_RETURN_CSTRING(result);
-}
-
-/*
- * reltimerecv - converts external binary format to reltime
- */
-Datum
-reltimerecv(PG_FUNCTION_ARGS)
-{
- StringInfo buf = (StringInfo) PG_GETARG_POINTER(0);
-
- PG_RETURN_RELATIVETIME((RelativeTime) pq_getmsgint(buf, sizeof(RelativeTime)));
-}
-
-/*
- * reltimesend - converts reltime to binary format
- */
-Datum
-reltimesend(PG_FUNCTION_ARGS)
-{
- RelativeTime time = PG_GETARG_RELATIVETIME(0);
- StringInfoData buf;
-
- pq_begintypsend(&buf);
- pq_sendint(&buf, time, sizeof(time));
- PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
-}
-
-
-static void
-reltime2tm(RelativeTime time, struct pg_tm *tm)
-{
- double dtime = time;
-
- FMODULO(dtime, tm->tm_year, 31557600);
- FMODULO(dtime, tm->tm_mon, 2592000);
- FMODULO(dtime, tm->tm_mday, SECS_PER_DAY);
- FMODULO(dtime, tm->tm_hour, SECS_PER_HOUR);
- FMODULO(dtime, tm->tm_min, SECS_PER_MINUTE);
- FMODULO(dtime, tm->tm_sec, 1);
-}
-
-
/*****************************************************************************
* PUBLIC ROUTINES *
*****************************************************************************/
-Datum
-interval_reltime(PG_FUNCTION_ARGS)
-{
- Interval *interval = PG_GETARG_INTERVAL_P(0);
- RelativeTime time;
- int year,
- month,
- day;
- TimeOffset span;
-
- year = interval->month / MONTHS_PER_YEAR;
- month = interval->month % MONTHS_PER_YEAR;
- day = interval->day;
-
- span = ((INT64CONST(365250000) * year + INT64CONST(30000000) * month +
- INT64CONST(1000000) * day) * INT64CONST(86400)) +
- interval->time;
- span /= USECS_PER_SEC;
-
- if (span < INT_MIN || span > INT_MAX)
- time = INVALID_RELTIME;
- else
- time = span;
-
- PG_RETURN_RELATIVETIME(time);
-}
-
-
-Datum
-reltime_interval(PG_FUNCTION_ARGS)
-{
- RelativeTime reltime = PG_GETARG_RELATIVETIME(0);
- Interval *result;
- int year,
- month,
- day;
-
- result = (Interval *) palloc(sizeof(Interval));
-
- switch (reltime)
- {
- case INVALID_RELTIME:
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert reltime \"invalid\" to interval")));
- result->time = 0;
- result->day = 0;
- result->month = 0;
- break;
-
- default:
- year = reltime / SECS_PER_YEAR;
- reltime -= year * SECS_PER_YEAR;
- month = reltime / (DAYS_PER_MONTH * SECS_PER_DAY);
- reltime -= month * (DAYS_PER_MONTH * SECS_PER_DAY);
- day = reltime / SECS_PER_DAY;
- reltime -= day * SECS_PER_DAY;
-
- result->time = (reltime * USECS_PER_SEC);
- result->month = MONTHS_PER_YEAR * year + month;
- result->day = day;
- break;
- }
-
- PG_RETURN_INTERVAL_P(result);
-}
-
-
-/*
- * timepl, timemi and abstimemi use the formula
- * abstime + reltime = abstime
- * so abstime - reltime = abstime
- * and abstime - abstime = reltime
- */
-
-/*
- * timepl - returns the value of (abstime t1 + reltime t2)
- */
-Datum
-timepl(PG_FUNCTION_ARGS)
-{
- AbsoluteTime t1 = PG_GETARG_ABSOLUTETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- if (AbsoluteTimeIsReal(t1) &&
- RelativeTimeIsValid(t2) &&
- ((t2 > 0 && t1 < NOEND_ABSTIME - t2) ||
- (t2 <= 0 && t1 > NOSTART_ABSTIME - t2))) /* prevent overflow */
- PG_RETURN_ABSOLUTETIME(t1 + t2);
-
- PG_RETURN_ABSOLUTETIME(INVALID_ABSTIME);
-}
-
-
-/*
- * timemi - returns the value of (abstime t1 - reltime t2)
- */
-Datum
-timemi(PG_FUNCTION_ARGS)
-{
- AbsoluteTime t1 = PG_GETARG_ABSOLUTETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- if (AbsoluteTimeIsReal(t1) &&
- RelativeTimeIsValid(t2) &&
- ((t2 > 0 && t1 > NOSTART_ABSTIME + t2) ||
- (t2 <= 0 && t1 < NOEND_ABSTIME + t2))) /* prevent overflow */
- PG_RETURN_ABSOLUTETIME(t1 - t2);
-
- PG_RETURN_ABSOLUTETIME(INVALID_ABSTIME);
-}
-
/*
* timenow - returns time "now", internal format
@@ -799,99 +566,6 @@ timenow(PG_FUNCTION_ARGS)
PG_RETURN_ABSOLUTETIME(GetCurrentAbsoluteTime());
}
-/*
- * reltime comparison routines
- */
-static int
-reltime_cmp_internal(RelativeTime a, RelativeTime b)
-{
- /*
- * We consider all INVALIDs to be equal and larger than any non-INVALID.
- * This is somewhat arbitrary; the important thing is to have a consistent
- * sort order.
- */
- if (a == INVALID_RELTIME)
- {
- if (b == INVALID_RELTIME)
- return 0; /* INVALID = INVALID */
- else
- return 1; /* INVALID > non-INVALID */
- }
-
- if (b == INVALID_RELTIME)
- return -1; /* non-INVALID < INVALID */
-
- if (a > b)
- return 1;
- else if (a == b)
- return 0;
- else
- return -1;
-}
-
-Datum
-reltimeeq(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) == 0);
-}
-
-Datum
-reltimene(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) != 0);
-}
-
-Datum
-reltimelt(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) < 0);
-}
-
-Datum
-reltimegt(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) > 0);
-}
-
-Datum
-reltimele(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) <= 0);
-}
-
-Datum
-reltimege(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_BOOL(reltime_cmp_internal(t1, t2) >= 0);
-}
-
-Datum
-btreltimecmp(PG_FUNCTION_ARGS)
-{
- RelativeTime t1 = PG_GETARG_RELATIVETIME(0);
- RelativeTime t2 = PG_GETARG_RELATIVETIME(1);
-
- PG_RETURN_INT32(reltime_cmp_internal(t1, t2));
-}
-
/*****************************************************************************
*
*****************************************************************************/
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index b28f428..ec53a9a 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -3945,7 +3945,6 @@ convert_to_scalar(Datum value, Oid valuetypid, double *scaledvalue,
case ABSTIMEOID:
case DATEOID:
case INTERVALOID:
- case RELTIMEOID:
case TIMEOID:
case TIMETZOID:
*scaledvalue = convert_timevalue_to_scalar(value, valuetypid);
@@ -4376,8 +4375,6 @@ convert_timevalue_to_scalar(Datum value, Oid typid)
return interval->time + interval->day * (double) USECS_PER_DAY +
interval->month * ((DAYS_PER_YEAR / (double) MONTHS_PER_YEAR) * USECS_PER_DAY);
}
- case RELTIMEOID:
- return (DatumGetRelativeTime(value) * 1000000.0);
case TIMEOID:
return DatumGetTimeADT(value);
case TIMETZOID:
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index 6fc2f08..74a3706 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -463,16 +463,6 @@ DATA(insert ( 2099 790 790 4 s 905 403 0 ));
DATA(insert ( 2099 790 790 5 s 903 403 0 ));
/*
- * btree reltime_ops
- */
-
-DATA(insert ( 2233 703 703 1 s 568 403 0 ));
-DATA(insert ( 2233 703 703 2 s 570 403 0 ));
-DATA(insert ( 2233 703 703 3 s 566 403 0 ));
-DATA(insert ( 2233 703 703 4 s 571 403 0 ));
-DATA(insert ( 2233 703 703 5 s 569 403 0 ));
-
-/*
* btree array_ops
*/
@@ -581,8 +571,6 @@ DATA(insert ( 2225 28 28 1 s 352 405 0 ));
DATA(insert ( 2226 29 29 1 s 385 405 0 ));
/* abstime_ops */
DATA(insert ( 2227 702 702 1 s 560 405 0 ));
-/* reltime_ops */
-DATA(insert ( 2228 703 703 1 s 566 405 0 ));
/* text_pattern_ops */
DATA(insert ( 2229 25 25 1 s 98 405 0 ));
/* bpchar_pattern_ops */
@@ -989,12 +977,6 @@ DATA(insert ( 4072 702 702 2 s 564 3580 0 ));
DATA(insert ( 4072 702 702 3 s 560 3580 0 ));
DATA(insert ( 4072 702 702 4 s 565 3580 0 ));
DATA(insert ( 4072 702 702 5 s 563 3580 0 ));
-/* minmax reltime */
-DATA(insert ( 4073 703 703 1 s 568 3580 0 ));
-DATA(insert ( 4073 703 703 2 s 570 3580 0 ));
-DATA(insert ( 4073 703 703 3 s 566 3580 0 ));
-DATA(insert ( 4073 703 703 4 s 571 3580 0 ));
-DATA(insert ( 4073 703 703 5 s 569 3580 0 ));
/* minmax macaddr */
DATA(insert ( 4074 829 829 1 s 1222 3580 0 ));
DATA(insert ( 4074 829 829 2 s 1223 3580 0 ));
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index cca4d63..35558aa 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -135,7 +135,6 @@ DATA(insert ( 2095 25 25 2 3332 ));
DATA(insert ( 2097 1042 1042 1 2180 ));
DATA(insert ( 2097 1042 1042 2 3333 ));
DATA(insert ( 2099 790 790 1 377 ));
-DATA(insert ( 2233 703 703 1 380 ));
DATA(insert ( 2789 27 27 1 2794 ));
DATA(insert ( 2968 2950 2950 1 2960 ));
DATA(insert ( 2968 2950 2950 2 3300 ));
@@ -177,7 +176,6 @@ DATA(insert ( 2223 17 17 1 456 ));
DATA(insert ( 2225 28 28 1 450 ));
DATA(insert ( 2226 29 29 1 450 ));
DATA(insert ( 2227 702 702 1 450 ));
-DATA(insert ( 2228 703 703 1 450 ));
DATA(insert ( 2229 25 25 1 400 ));
DATA(insert ( 2231 1042 1042 1 1080 ));
DATA(insert ( 2235 1033 1033 1 329 ));
@@ -406,11 +404,6 @@ DATA(insert ( 4072 702 702 1 3383 ));
DATA(insert ( 4072 702 702 2 3384 ));
DATA(insert ( 4072 702 702 3 3385 ));
DATA(insert ( 4072 702 702 4 3386 ));
-/* minmax reltime */
-DATA(insert ( 4073 703 703 1 3383 ));
-DATA(insert ( 4073 703 703 2 3384 ));
-DATA(insert ( 4073 703 703 3 3385 ));
-DATA(insert ( 4073 703 703 4 3386 ));
/* minmax macaddr */
DATA(insert ( 4074 829 829 1 3383 ));
DATA(insert ( 4074 829 829 2 3384 ));
diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h
index 1782753..0a3b3af 100644
--- a/src/include/catalog/pg_cast.h
+++ b/src/include/catalog/pg_cast.h
@@ -269,7 +269,6 @@ DATA(insert ( 702 1082 1179 a f ));
DATA(insert ( 702 1083 1364 a f ));
DATA(insert ( 702 1114 2023 i f ));
DATA(insert ( 702 1184 1173 i f ));
-DATA(insert ( 703 1186 1177 i f ));
DATA(insert ( 1082 1114 2024 i f ));
DATA(insert ( 1082 1184 1174 i f ));
DATA(insert ( 1083 1186 1370 i f ));
@@ -283,14 +282,11 @@ DATA(insert ( 1184 1082 1178 a f ));
DATA(insert ( 1184 1083 2019 a f ));
DATA(insert ( 1184 1114 2027 a f ));
DATA(insert ( 1184 1266 1388 a f ));
-DATA(insert ( 1186 703 1194 a f ));
DATA(insert ( 1186 1083 1419 a f ));
DATA(insert ( 1266 1083 2046 a f ));
-/* Cross-category casts between int4 and abstime, reltime */
+/* Cross-category casts between int4 and abstime */
DATA(insert ( 23 702 0 e b ));
DATA(insert ( 702 23 0 e b ));
-DATA(insert ( 23 703 0 e b ));
-DATA(insert ( 703 23 0 e b ));
/*
* Geometric category
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 8212304..504ddf2 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -174,11 +174,9 @@ DATA(insert ( 403 tid_ops PGNSP PGUID 2789 27 t 0 ));
DATA(insert ( 405 xid_ops PGNSP PGUID 2225 28 t 0 ));
DATA(insert ( 405 cid_ops PGNSP PGUID 2226 29 t 0 ));
DATA(insert ( 405 abstime_ops PGNSP PGUID 2227 702 t 0 ));
-DATA(insert ( 405 reltime_ops PGNSP PGUID 2228 703 t 0 ));
DATA(insert ( 405 text_pattern_ops PGNSP PGUID 2229 25 f 0 ));
DATA(insert ( 405 varchar_pattern_ops PGNSP PGUID 2229 25 f 0 ));
DATA(insert ( 405 bpchar_pattern_ops PGNSP PGUID 2231 1042 f 0 ));
-DATA(insert ( 403 reltime_ops PGNSP PGUID 2233 703 t 0 ));
DATA(insert ( 405 aclitem_ops PGNSP PGUID 2235 1033 t 0 ));
DATA(insert ( 783 box_ops PGNSP PGUID 2593 603 t 0 ));
DATA(insert ( 783 point_ops PGNSP PGUID 1029 600 t 603 ));
@@ -223,7 +221,6 @@ DATA(insert ( 3580 tid_minmax_ops PGNSP PGUID 4069 27 t 27 ));
DATA(insert ( 3580 float4_minmax_ops PGNSP PGUID 4070 700 t 700 ));
DATA(insert ( 3580 float8_minmax_ops PGNSP PGUID 4070 701 t 701 ));
DATA(insert ( 3580 abstime_minmax_ops PGNSP PGUID 4072 702 t 702 ));
-DATA(insert ( 3580 reltime_minmax_ops PGNSP PGUID 4073 703 t 703 ));
DATA(insert ( 3580 macaddr_minmax_ops PGNSP PGUID 4074 829 t 829 ));
DATA(insert ( 3580 macaddr8_minmax_ops PGNSP PGUID 4109 774 t 774 ));
DATA(insert ( 3580 inet_minmax_ops PGNSP PGUID 4075 869 f 869 ));
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index d79f5f2..8157ef3 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -361,22 +361,6 @@ DATA(insert OID = 564 ( "<=" PGNSP PGUID b f f 702 702 16 565 563 abstimele
DESCR("less than or equal");
DATA(insert OID = 565 ( ">=" PGNSP PGUID b f f 702 702 16 564 562 abstimege scalargtsel scalargtjoinsel ));
DESCR("greater than or equal");
-DATA(insert OID = 566 ( "=" PGNSP PGUID b t t 703 703 16 566 567 reltimeeq eqsel eqjoinsel ));
-DESCR("equal");
-DATA(insert OID = 567 ( "<>" PGNSP PGUID b f f 703 703 16 567 566 reltimene neqsel neqjoinsel ));
-DESCR("not equal");
-DATA(insert OID = 568 ( "<" PGNSP PGUID b f f 703 703 16 569 571 reltimelt scalarltsel scalarltjoinsel ));
-DESCR("less than");
-DATA(insert OID = 569 ( ">" PGNSP PGUID b f f 703 703 16 568 570 reltimegt scalargtsel scalargtjoinsel ));
-DESCR("greater than");
-DATA(insert OID = 570 ( "<=" PGNSP PGUID b f f 703 703 16 571 569 reltimele scalarltsel scalarltjoinsel ));
-DESCR("less than or equal");
-DATA(insert OID = 571 ( ">=" PGNSP PGUID b f f 703 703 16 570 568 reltimege scalargtsel scalargtjoinsel ));
-DESCR("greater than or equal");
-DATA(insert OID = 581 ( "+" PGNSP PGUID b f f 702 703 702 0 0 timepl - - ));
-DESCR("add");
-DATA(insert OID = 582 ( "-" PGNSP PGUID b f f 702 703 702 0 0 timemi - - ));
-DESCR("subtract");
DATA(insert OID = 584 ( "-" PGNSP PGUID l f f 0 700 700 0 0 float4um - - ));
DESCR("negate");
DATA(insert OID = 585 ( "-" PGNSP PGUID l f f 0 701 701 0 0 float8um - - ));
diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h
index b13590a..d0ab051 100644
--- a/src/include/catalog/pg_opfamily.h
+++ b/src/include/catalog/pg_opfamily.h
@@ -123,10 +123,8 @@ DATA(insert OID = 2789 ( 403 tid_ops PGNSP PGUID ));
DATA(insert OID = 2225 ( 405 xid_ops PGNSP PGUID ));
DATA(insert OID = 2226 ( 405 cid_ops PGNSP PGUID ));
DATA(insert OID = 2227 ( 405 abstime_ops PGNSP PGUID ));
-DATA(insert OID = 2228 ( 405 reltime_ops PGNSP PGUID ));
DATA(insert OID = 2229 ( 405 text_pattern_ops PGNSP PGUID ));
DATA(insert OID = 2231 ( 405 bpchar_pattern_ops PGNSP PGUID ));
-DATA(insert OID = 2233 ( 403 reltime_ops PGNSP PGUID ));
DATA(insert OID = 2235 ( 405 aclitem_ops PGNSP PGUID ));
DATA(insert OID = 2593 ( 783 box_ops PGNSP PGUID ));
DATA(insert OID = 2594 ( 783 poly_ops PGNSP PGUID ));
@@ -170,7 +168,6 @@ DATA(insert OID = 4068 ( 3580 oid_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4069 ( 3580 tid_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4070 ( 3580 float_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4072 ( 3580 abstime_minmax_ops PGNSP PGUID ));
-DATA(insert OID = 4073 ( 3580 reltime_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4074 ( 3580 macaddr_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4109 ( 3580 macaddr8_minmax_ops PGNSP PGUID ));
DATA(insert OID = 4075 ( 3580 network_minmax_ops PGNSP PGUID ));
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index c002766..5e902e7 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -444,12 +444,6 @@ DATA(insert OID = 240 ( abstimein PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1
DESCR("I/O");
DATA(insert OID = 241 ( abstimeout PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 2275 "702" _null_ _null_ _null_ _null_ _null_ abstimeout _null_ _null_ _null_ ));
DESCR("I/O");
-DATA(insert OID = 242 ( reltimein PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 703 "2275" _null_ _null_ _null_ _null_ _null_ reltimein _null_ _null_ _null_ ));
-DESCR("I/O");
-DATA(insert OID = 243 ( reltimeout PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 2275 "703" _null_ _null_ _null_ _null_ _null_ reltimeout _null_ _null_ _null_ ));
-DESCR("I/O");
-DATA(insert OID = 244 ( timepl PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 702 "702 703" _null_ _null_ _null_ _null_ _null_ timepl _null_ _null_ _null_ ));
-DATA(insert OID = 245 ( timemi PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 702 "702 703" _null_ _null_ _null_ _null_ _null_ timemi _null_ _null_ _null_ ));
DATA(insert OID = 250 ( timenow PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 702 "" _null_ _null_ _null_ _null_ _null_ timenow _null_ _null_ _null_ ));
DESCR("current date and time (abstime)");
DATA(insert OID = 251 ( abstimeeq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "702 702" _null_ _null_ _null_ _null_ _null_ abstimeeq _null_ _null_ _null_ ));
@@ -458,12 +452,6 @@ DATA(insert OID = 253 ( abstimelt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2
DATA(insert OID = 254 ( abstimegt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "702 702" _null_ _null_ _null_ _null_ _null_ abstimegt _null_ _null_ _null_ ));
DATA(insert OID = 255 ( abstimele PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "702 702" _null_ _null_ _null_ _null_ _null_ abstimele _null_ _null_ _null_ ));
DATA(insert OID = 256 ( abstimege PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "702 702" _null_ _null_ _null_ _null_ _null_ abstimege _null_ _null_ _null_ ));
-DATA(insert OID = 257 ( reltimeeq PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimeeq _null_ _null_ _null_ ));
-DATA(insert OID = 258 ( reltimene PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimene _null_ _null_ _null_ ));
-DATA(insert OID = 259 ( reltimelt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimelt _null_ _null_ _null_ ));
-DATA(insert OID = 260 ( reltimegt PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimegt _null_ _null_ _null_ ));
-DATA(insert OID = 261 ( reltimele PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimele _null_ _null_ _null_ ));
-DATA(insert OID = 262 ( reltimege PGNSP PGUID 12 1 0 0 0 f f f t t f i s 2 0 16 "703 703" _null_ _null_ _null_ _null_ _null_ reltimege _null_ _null_ _null_ ));
DATA(insert OID = 274 ( timeofday PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 25 "" _null_ _null_ _null_ _null_ _null_ timeofday _null_ _null_ _null_ ));
DESCR("current date and time - increments during transactions");
DATA(insert OID = 275 ( isfinite PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 16 "702" _null_ _null_ _null_ _null_ _null_ abstime_finite _null_ _null_ _null_ ));
@@ -613,8 +601,6 @@ DATA(insert OID = 3255 ( bttextsortsupport PGNSP PGUID 12 1 0 0 0 f f f f t f i
DESCR("sort support");
DATA(insert OID = 377 ( cash_cmp PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 23 "790 790" _null_ _null_ _null_ _null_ _null_ cash_cmp _null_ _null_ _null_ ));
DESCR("less-equal-greater");
-DATA(insert OID = 380 ( btreltimecmp PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 23 "703 703" _null_ _null_ _null_ _null_ _null_ btreltimecmp _null_ _null_ _null_ ));
-DESCR("less-equal-greater");
DATA(insert OID = 382 ( btarraycmp PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 23 "2277 2277" _null_ _null_ _null_ _null_ _null_ btarraycmp _null_ _null_ _null_ ));
DESCR("less-equal-greater");
@@ -1227,8 +1213,6 @@ DATA(insert OID = 1295 ( justify_days PGNSP PGUID 12 1 0 0 0 f f f f t f i s
DESCR("promote groups of 30 days to numbers of months");
DATA(insert OID = 1176 ( timestamptz PGNSP PGUID 14 1 0 0 0 f f f f t f s s 2 0 1184 "1082 1083" _null_ _null_ _null_ _null_ _null_ "select cast(($1 + $2) as timestamp with time zone)" _null_ _null_ _null_ ));
DESCR("convert date and time to timestamp with time zone");
-DATA(insert OID = 1177 ( interval PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 1186 "703" _null_ _null_ _null_ _null_ _null_ reltime_interval _null_ _null_ _null_ ));
-DESCR("convert reltime to interval");
DATA(insert OID = 1178 ( date PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 1082 "1184" _null_ _null_ _null_ _null_ _null_ timestamptz_date _null_ _null_ _null_ ));
DESCR("convert timestamp with time zone to date");
DATA(insert OID = 1179 ( date PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 1082 "702" _null_ _null_ _null_ _null_ _null_ abstime_date _null_ _null_ _null_ ));
@@ -1243,8 +1227,6 @@ DESCR("age of a multi-transaction ID, in multi-transactions before current multi
DATA(insert OID = 1188 ( timestamptz_mi PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1186 "1184 1184" _null_ _null_ _null_ _null_ _null_ timestamp_mi _null_ _null_ _null_ ));
DATA(insert OID = 1189 ( timestamptz_pl_interval PGNSP PGUID 12 1 0 0 0 f f f f t f s s 2 0 1184 "1184 1186" _null_ _null_ _null_ _null_ _null_ timestamptz_pl_interval _null_ _null_ _null_ ));
DATA(insert OID = 1190 ( timestamptz_mi_interval PGNSP PGUID 12 1 0 0 0 f f f f t f s s 2 0 1184 "1184 1186" _null_ _null_ _null_ _null_ _null_ timestamptz_mi_interval _null_ _null_ _null_ ));
-DATA(insert OID = 1194 ( reltime PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 703 "1186" _null_ _null_ _null_ _null_ _null_ interval_reltime _null_ _null_ _null_ ));
-DESCR("convert interval to reltime");
DATA(insert OID = 1195 ( timestamptz_smaller PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1184 "1184 1184" _null_ _null_ _null_ _null_ _null_ timestamp_smaller _null_ _null_ _null_ ));
DESCR("smaller of two");
DATA(insert OID = 1196 ( timestamptz_larger PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1184 "1184 1184" _null_ _null_ _null_ _null_ _null_ timestamp_larger _null_ _null_ _null_ ));
@@ -1493,8 +1475,6 @@ DESCR("character length");
DATA(insert OID = 1382 ( date_part PGNSP PGUID 14 1 0 0 0 f f f f t f s s 2 0 701 "25 702" _null_ _null_ _null_ _null_ _null_ "select pg_catalog.date_part($1, cast($2 as timestamp with time zone))" _null_ _null_ _null_ ));
DESCR("extract field from abstime");
-DATA(insert OID = 1383 ( date_part PGNSP PGUID 14 1 0 0 0 f f f f t f s s 2 0 701 "25 703" _null_ _null_ _null_ _null_ _null_ "select pg_catalog.date_part($1, cast($2 as pg_catalog.interval))" _null_ _null_ _null_ ));
-DESCR("extract field from reltime");
DATA(insert OID = 1384 ( date_part PGNSP PGUID 14 1 0 0 0 f f f f t f i s 2 0 701 "25 1082" _null_ _null_ _null_ _null_ _null_ "select pg_catalog.date_part($1, cast($2 as timestamp without time zone))" _null_ _null_ _null_ ));
DESCR("extract field from date");
DATA(insert OID = 1385 ( date_part PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 701 "25 1083" _null_ _null_ _null_ _null_ _null_ time_part _null_ _null_ _null_ ));
@@ -4006,10 +3986,6 @@ DATA(insert OID = 2462 ( abstimerecv PGNSP PGUID 12 1 0 0 0 f f f f t f i s
DESCR("I/O");
DATA(insert OID = 2463 ( abstimesend PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 17 "702" _null_ _null_ _null_ _null_ _null_ abstimesend _null_ _null_ _null_ ));
DESCR("I/O");
-DATA(insert OID = 2464 ( reltimerecv PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 703 "2281" _null_ _null_ _null_ _null_ _null_ reltimerecv _null_ _null_ _null_ ));
-DESCR("I/O");
-DATA(insert OID = 2465 ( reltimesend PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 17 "703" _null_ _null_ _null_ _null_ _null_ reltimesend _null_ _null_ _null_ ));
-DESCR("I/O");
DATA(insert OID = 2468 ( date_recv PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 1082 "2281" _null_ _null_ _null_ _null_ _null_ date_recv _null_ _null_ _null_ ));
DESCR("I/O");
DATA(insert OID = 2469 ( date_send PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 17 "1082" _null_ _null_ _null_ _null_ _null_ date_send _null_ _null_ _null_ ));
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index aab23cb..d54b453 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -420,9 +420,6 @@ DESCR("double-precision floating point number, 8-byte storage");
DATA(insert OID = 702 ( abstime PGNSP PGUID 4 t b D f t \054 0 0 1023 abstimein abstimeout abstimerecv abstimesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("absolute, limited-range date and time (Unix system time)");
#define ABSTIMEOID 702
-DATA(insert OID = 703 ( reltime PGNSP PGUID 4 t b T f t \054 0 0 1024 reltimein reltimeout reltimerecv reltimesend - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
-DESCR("relative, limited-range time interval (Unix delta time)");
-#define RELTIMEOID 703
DATA(insert OID = 705 ( unknown PGNSP PGUID -2 f p X f t \054 0 0 0 unknownin unknownout unknownrecv unknownsend - - - c p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("");
#define UNKNOWNOID 705
@@ -482,7 +479,6 @@ DATA(insert OID = 1021 ( _float4 PGNSP PGUID -1 f b A f t \054 0 700 0 array_i
#define FLOAT4ARRAYOID 1021
DATA(insert OID = 1022 ( _float8 PGNSP PGUID -1 f b A f t \054 0 701 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1023 ( _abstime PGNSP PGUID -1 f b A f t \054 0 702 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
-DATA(insert OID = 1024 ( _reltime PGNSP PGUID -1 f b A f t \054 0 703 0 array_in array_out array_recv array_send - - array_typanalyze i x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1027 ( _polygon PGNSP PGUID -1 f b A f t \054 0 604 0 array_in array_out array_recv array_send - - array_typanalyze d x f 0 -1 0 0 _null_ _null_ _null_ ));
DATA(insert OID = 1033 ( aclitem PGNSP PGUID 12 f b U f t \054 0 0 1034 aclitemin aclitemout - - - - - i p f 0 -1 0 0 _null_ _null_ _null_ ));
DESCR("access control list");
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 7968569..c426677 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -3,7 +3,7 @@
* datetime.h
* Definitions for date/time support code.
* The support code is shared with other date data types,
- * including abstime, reltime, date, and time.
+ * including abstime, date, and time.
*
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h
index 3f54ff4..4bd4c2b 100644
--- a/src/include/utils/nabstime.h
+++ b/src/include/utils/nabstime.h
@@ -34,22 +34,14 @@
* interval.
*/
typedef int32 AbsoluteTime;
-typedef int32 RelativeTime;
/*
* Macros for fmgr-callable functions.
*/
#define DatumGetAbsoluteTime(X) ((AbsoluteTime) DatumGetInt32(X))
-#define DatumGetRelativeTime(X) ((RelativeTime) DatumGetInt32(X))
-
#define AbsoluteTimeGetDatum(X) Int32GetDatum(X)
-#define RelativeTimeGetDatum(X) Int32GetDatum(X)
-
#define PG_GETARG_ABSOLUTETIME(n) DatumGetAbsoluteTime(PG_GETARG_DATUM(n))
-#define PG_GETARG_RELATIVETIME(n) DatumGetRelativeTime(PG_GETARG_DATUM(n))
-
#define PG_RETURN_ABSOLUTETIME(x) return AbsoluteTimeGetDatum(x)
-#define PG_RETURN_RELATIVETIME(x) return RelativeTimeGetDatum(x)
/*
* Reserved values
@@ -65,8 +57,6 @@ typedef int32 RelativeTime;
#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC) /* 2147483645 (2^31 - 3) */
#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN) /* -2147483648 */
-#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 (2^31 - 1) */
-
#define AbsoluteTimeIsValid(time) \
((bool) ((time) != INVALID_ABSTIME))
@@ -80,10 +70,6 @@ typedef int32 RelativeTime;
((bool) (((AbsoluteTime) (time)) < NOEND_ABSTIME && \
((AbsoluteTime) (time)) != NOSTART_ABSTIME))
-#define RelativeTimeIsValid(time) \
- ((bool) (((RelativeTime) (time)) != INVALID_RELTIME))
-
-
/* non-fmgr-callable support routines */
extern AbsoluteTime GetCurrentAbsoluteTime(void);
extern void abstime2tm(AbsoluteTime time, int *tzp, struct pg_tm *tm, char **tzn);
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 7e24687..cb81322 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -225,8 +225,6 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
return (ECPG_ARRAY_ERROR);
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ABSTIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
return (ECPG_ARRAY_ERROR);
- if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), RELTIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), UNKNOWNOID, ECPG_ARRAY_NONE, stmt->lineno))
return (ECPG_ARRAY_ERROR);
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIRCLEOID, ECPG_ARRAY_NONE, stmt->lineno))
diff --git a/src/interfaces/ecpg/ecpglib/pg_type.h b/src/interfaces/ecpg/ecpglib/pg_type.h
index e6d4843..24d71c6 100644
--- a/src/interfaces/ecpg/ecpglib/pg_type.h
+++ b/src/interfaces/ecpg/ecpglib/pg_type.h
@@ -39,7 +39,6 @@
#define FLOAT4OID 700
#define FLOAT8OID 701
#define ABSTIMEOID 702
-#define RELTIMEOID 703
#define UNKNOWNOID 705
#define CIRCLEOID 718
#define CASHOID 790
diff --git a/src/test/regress/expected/abstime.out b/src/test/regress/expected/abstime.out
index 91614da..26899c0 100644
--- a/src/test/regress/expected/abstime.out
+++ b/src/test/regress/expected/abstime.out
@@ -1,7 +1,6 @@
--
-- ABSTIME
-- testing built-in time type abstime
--- uses reltime
--
--
-- timezones may vary based not only on location but the operating
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index f9d12e0..16eafe3 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -2047,70 +2047,6 @@ SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS d
(256 rows)
--
--- abstime, reltime arithmetic
---
-SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
- FROM ABSTIME_TBL, RELTIME_TBL
- WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971'
- ORDER BY abstime, reltime;
- ten | abstime | reltime
------+------------------------------+---------------
- | Sat May 10 23:59:12 1947 PST | @ 14 secs ago
- | Sat May 10 23:59:12 1947 PST | @ 1 min
- | Sat May 10 23:59:12 1947 PST | @ 5 hours
- | Sat May 10 23:59:12 1947 PST | @ 10 days
- | Sat May 10 23:59:12 1947 PST | @ 3 mons
- | Wed Dec 31 16:00:00 1969 PST | @ 14 secs ago
- | Wed Dec 31 16:00:00 1969 PST | @ 1 min
- | Wed Dec 31 16:00:00 1969 PST | @ 5 hours
- | Wed Dec 31 16:00:00 1969 PST | @ 10 days
- | Wed Dec 31 16:00:00 1969 PST | @ 3 mons
-(10 rows)
-
--- these four queries should return the same answer
--- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
--- therefore, should not show up in the results.
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
- < abstime 'Jan 14 14:00:00 1977';
- three | f1
--------+------------------------------
- | Sun Jan 14 03:14:21 1973 PST
- | Wed Dec 31 16:00:00 1969 PST
- | Sat May 10 23:59:12 1947 PST
-(3 rows)
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
- < abstime 'Jan 14 14:00:00 1971';
- three | f1
--------+------------------------------
- | Sun Jan 14 03:14:21 1973 PST
- | Wed Dec 31 16:00:00 1969 PST
- | Sat May 10 23:59:12 1947 PST
-(3 rows)
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
- < abstime 'Jan 14 14:00:00 1971';
- three | f1
--------+------------------------------
- | Sun Jan 14 03:14:21 1973 PST
- | Wed Dec 31 16:00:00 1969 PST
- | Sat May 10 23:59:12 1947 PST
-(3 rows)
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
- < abstime 'Jan 14 14:00:00 1977';
- three | f1
--------+------------------------------
- | Sun Jan 14 03:14:21 1973 PST
- | Wed Dec 31 16:00:00 1969 PST
- | Sat May 10 23:59:12 1947 PST
-(3 rows)
-
---
-- Conversions
--
SELECT '' AS "16", f1 AS "timestamp", date(f1) AS date
@@ -2183,34 +2119,6 @@ SELECT '' AS two, d1 AS "timestamp", abstime(d1) AS abstime
SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp"
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
ERROR: cannot convert abstime "invalid" to timestamp
-SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime
- FROM INTERVAL_TBL;
- ten | interval | reltime
------+-------------------------------+-------------------------------
- | @ 1 min | @ 1 min
- | @ 5 hours | @ 5 hours
- | @ 10 days | @ 10 days
- | @ 34 years | @ 34 years
- | @ 3 mons | @ 3 mons
- | @ 14 secs ago | @ 14 secs ago
- | @ 1 day 2 hours 3 mins 4 secs | @ 1 day 2 hours 3 mins 4 secs
- | @ 6 years | @ 6 years
- | @ 5 mons | @ 5 mons
- | @ 5 mons 12 hours | @ 5 mons 12 hours
-(10 rows)
-
-SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval
- FROM RELTIME_TBL;
- six | reltime | interval
------+---------------+---------------
- | @ 1 min | @ 1 min
- | @ 5 hours | @ 5 hours
- | @ 10 days | @ 10 days
- | @ 34 years | @ 34 years
- | @ 3 mons | @ 3 mons
- | @ 14 secs ago | @ 14 secs ago
-(6 rows)
-
DROP TABLE TEMP_TIMESTAMP;
--
-- Formats
diff --git a/src/test/regress/expected/opr_sanity.out b/src/test/regress/expected/opr_sanity.out
index 56a4b26..d5a738b 100644
--- a/src/test/regress/expected/opr_sanity.out
+++ b/src/test/regress/expected/opr_sanity.out
@@ -526,12 +526,6 @@ abstimelt(abstime,abstime)
abstimegt(abstime,abstime)
abstimele(abstime,abstime)
abstimege(abstime,abstime)
-reltimeeq(reltime,reltime)
-reltimene(reltime,reltime)
-reltimelt(reltime,reltime)
-reltimegt(reltime,reltime)
-reltimele(reltime,reltime)
-reltimege(reltime,reltime)
float4eq(real,real)
float4ne(real,real)
float4lt(real,real)
diff --git a/src/test/regress/expected/reltime.out b/src/test/regress/expected/reltime.out
deleted file mode 100644
index 14fdc6a..0000000
--- a/src/test/regress/expected/reltime.out
+++ /dev/null
@@ -1,109 +0,0 @@
---
--- RELTIME
---
-CREATE TABLE RELTIME_TBL (f1 reltime);
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 1 minute');
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 5 hour');
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 10 day');
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 34 year');
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months');
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago');
--- badly formatted reltimes
-INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime');
-ERROR: invalid input syntax for type reltime: "badly formatted reltime"
-LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltim...
- ^
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
-ERROR: invalid input syntax for type reltime: "@ 30 eons ago"
-LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
- ^
--- test reltime operators
-SELECT '' AS six, * FROM RELTIME_TBL;
- six | f1
------+---------------
- | @ 1 min
- | @ 5 hours
- | @ 10 days
- | @ 34 years
- | @ 3 mons
- | @ 14 secs ago
-(6 rows)
-
-SELECT '' AS five, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 <> reltime '@ 10 days';
- five | f1
-------+---------------
- | @ 1 min
- | @ 5 hours
- | @ 34 years
- | @ 3 mons
- | @ 14 secs ago
-(5 rows)
-
-SELECT '' AS three, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 <= reltime '@ 5 hours';
- three | f1
--------+---------------
- | @ 1 min
- | @ 5 hours
- | @ 14 secs ago
-(3 rows)
-
-SELECT '' AS three, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 < reltime '@ 1 day';
- three | f1
--------+---------------
- | @ 1 min
- | @ 5 hours
- | @ 14 secs ago
-(3 rows)
-
-SELECT '' AS one, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 = reltime '@ 34 years';
- one | f1
------+------------
- | @ 34 years
-(1 row)
-
-SELECT '' AS two, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 >= reltime '@ 1 month';
- two | f1
------+------------
- | @ 34 years
- | @ 3 mons
-(2 rows)
-
-SELECT '' AS five, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 > reltime '@ 3 seconds ago';
- five | f1
-------+------------
- | @ 1 min
- | @ 5 hours
- | @ 10 days
- | @ 34 years
- | @ 3 mons
-(5 rows)
-
-SELECT '' AS fifteen, r1.*, r2.*
- FROM RELTIME_TBL r1, RELTIME_TBL r2
- WHERE r1.f1 > r2.f1
- ORDER BY r1.f1, r2.f1;
- fifteen | f1 | f1
----------+------------+---------------
- | @ 1 min | @ 14 secs ago
- | @ 5 hours | @ 14 secs ago
- | @ 5 hours | @ 1 min
- | @ 10 days | @ 14 secs ago
- | @ 10 days | @ 1 min
- | @ 10 days | @ 5 hours
- | @ 3 mons | @ 14 secs ago
- | @ 3 mons | @ 1 min
- | @ 3 mons | @ 5 hours
- | @ 3 mons | @ 10 days
- | @ 34 years | @ 14 secs ago
- | @ 34 years | @ 1 min
- | @ 34 years | @ 5 hours
- | @ 34 years | @ 10 days
- | @ 34 years | @ 3 mons
-(15 rows)
-
diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out
index 7840c4c..6cc8104 100644
--- a/src/test/regress/expected/sanity_check.out
+++ b/src/test/regress/expected/sanity_check.out
@@ -165,7 +165,6 @@ quad_point_tbl|t
radix_text_tbl|t
ramp|f
real_city|f
-reltime_tbl|f
road|t
shighway|t
slow_emp4000|f
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index c5f9ffe..ff7d875 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,12 +23,12 @@ test: numerology
# ----------
# The second group of parallel tests
# ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval abstime reltime inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval abstime inet macaddr macaddr8 tstypes
# ----------
# Another group of parallel tests
# geometry depends on point, lseg, box, path, polygon and circle
-# horology depends on interval, timetz, timestamp, timestamptz, reltime and abstime
+# horology depends on interval, timetz, timestamp, timestamptz, and abstime
# ----------
test: geometry horology regex oidjoins type_sanity opr_sanity misc_sanity comments expressions
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 83ba380..1cf10e9 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -37,7 +37,6 @@ test: timestamp
test: timestamptz
test: interval
test: abstime
-test: reltime
test: inet
test: macaddr
test: macaddr8
diff --git a/src/test/regress/sql/abstime.sql b/src/test/regress/sql/abstime.sql
index 650d7fd..bcb4cd8 100644
--- a/src/test/regress/sql/abstime.sql
+++ b/src/test/regress/sql/abstime.sql
@@ -1,7 +1,6 @@
--
-- ABSTIME
-- testing built-in time type abstime
--- uses reltime
--
--
diff --git a/src/test/regress/sql/horology.sql b/src/test/regress/sql/horology.sql
index a7bc9dc..1cf02d3 100644
--- a/src/test/regress/sql/horology.sql
+++ b/src/test/regress/sql/horology.sql
@@ -268,35 +268,6 @@ SELECT '' AS "226", d1.f1 AS timestamp1, d2.f1 AS timestamp2, d1.f1 - d2.f1 AS d
ORDER BY timestamp1, timestamp2, difference;
--
--- abstime, reltime arithmetic
---
-
-SELECT '' AS ten, ABSTIME_TBL.f1 AS abstime, RELTIME_TBL.f1 AS reltime
- FROM ABSTIME_TBL, RELTIME_TBL
- WHERE (ABSTIME_TBL.f1 + RELTIME_TBL.f1) < abstime 'Jan 14 14:00:00 1971'
- ORDER BY abstime, reltime;
-
--- these four queries should return the same answer
--- the "infinity" and "-infinity" tuples in ABSTIME_TBL cannot be added and
--- therefore, should not show up in the results.
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year') -- +3 years
- < abstime 'Jan 14 14:00:00 1977';
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 + reltime '@ 3 year ago') -- -3 years
- < abstime 'Jan 14 14:00:00 1971';
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year') -- -(+3) years
- < abstime 'Jan 14 14:00:00 1971';
-
-SELECT '' AS three, * FROM ABSTIME_TBL
- WHERE (ABSTIME_TBL.f1 - reltime '@ 3 year ago') -- -(-3) years
- < abstime 'Jan 14 14:00:00 1977';
-
---
-- Conversions
--
@@ -320,12 +291,6 @@ SELECT '' AS two, d1 AS "timestamp", abstime(d1) AS abstime
SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp"
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
-SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime
- FROM INTERVAL_TBL;
-
-SELECT '' AS six, f1 as reltime, CAST(f1 AS interval) AS interval
- FROM RELTIME_TBL;
-
DROP TABLE TEMP_TIMESTAMP;
--
diff --git a/src/test/regress/sql/reltime.sql b/src/test/regress/sql/reltime.sql
deleted file mode 100644
index a07b64e..0000000
--- a/src/test/regress/sql/reltime.sql
+++ /dev/null
@@ -1,50 +0,0 @@
---
--- RELTIME
---
-
-CREATE TABLE RELTIME_TBL (f1 reltime);
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 1 minute');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 5 hour');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 10 day');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 34 year');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago');
-
-
--- badly formatted reltimes
-INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime');
-
-INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
-
--- test reltime operators
-
-SELECT '' AS six, * FROM RELTIME_TBL;
-
-SELECT '' AS five, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 <> reltime '@ 10 days';
-
-SELECT '' AS three, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 <= reltime '@ 5 hours';
-
-SELECT '' AS three, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 < reltime '@ 1 day';
-
-SELECT '' AS one, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 = reltime '@ 34 years';
-
-SELECT '' AS two, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 >= reltime '@ 1 month';
-
-SELECT '' AS five, * FROM RELTIME_TBL
- WHERE RELTIME_TBL.f1 > reltime '@ 3 seconds ago';
-
-SELECT '' AS fifteen, r1.*, r2.*
- FROM RELTIME_TBL r1, RELTIME_TBL r2
- WHERE r1.f1 > r2.f1
- ORDER BY r1.f1, r2.f1;
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index cd26dc2..1163ee5 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -1830,7 +1830,6 @@ Relation
RelationData
RelationPtr
RelationSyncEntry
-RelativeTime
RelcacheCallbackFunction
RelfilenodeMapEntry
RelfilenodeMapKey