aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/date.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-09-28 15:21:48 -0700
committerAndres Freund <andres@anarazel.de>2018-10-11 11:59:15 -0700
commitcda6a8d01d391eab45c4b3e0043a1b2b31072f5f (patch)
tree946bf47beeae6e3cbe13e00931a56561e4b1a0ec /src/backend/utils/adt/date.c
parent2d10defa7771931295ee804cf096fb9388472a7b (diff)
downloadpostgresql-cda6a8d01d391eab45c4b3e0043a1b2b31072f5f.tar.gz
postgresql-cda6a8d01d391eab45c4b3e0043a1b2b31072f5f.zip
Remove deprecated abstime, reltime, tinterval datatypes.
These types have been deprecated for a *long* time. Catversion bump, for obvious reasons. Author: Andres Freund Discussion: https://postgr.es/m/20181009192237.34wjp3nmw7oynmmr@alap3.anarazel.de https://postgr.es/m/20171213080506.cwjkpcz3bkk6yz2u@alap3.anarazel.de https://postgr.es/m/25615.1513115237@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/date.c')
-rw-r--r--src/backend/utils/adt/date.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 87146a21610..cb6b5e55bfc 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -29,7 +29,6 @@
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/datetime.h"
-#include "utils/nabstime.h"
#include "utils/sortsupport.h"
/*
@@ -1170,55 +1169,6 @@ timestamptz_date(PG_FUNCTION_ARGS)
}
-/* abstime_date()
- * Convert abstime to date data type.
- */
-Datum
-abstime_date(PG_FUNCTION_ARGS)
-{
- AbsoluteTime abstime = PG_GETARG_ABSOLUTETIME(0);
- DateADT result;
- struct pg_tm tt,
- *tm = &tt;
- int tz;
-
- switch (abstime)
- {
- case INVALID_ABSTIME:
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert reserved abstime value to date")));
- result = 0; /* keep compiler quiet */
- break;
-
- case NOSTART_ABSTIME:
- DATE_NOBEGIN(result);
- break;
-
- case NOEND_ABSTIME:
- DATE_NOEND(result);
- break;
-
- default:
- abstime2tm(abstime, &tz, tm, NULL);
- /* Prevent overflow in Julian-day routines */
- if (!IS_VALID_JULIAN(tm->tm_year, tm->tm_mon, tm->tm_mday))
- ereport(ERROR,
- (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("abstime out of range for date")));
- result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - POSTGRES_EPOCH_JDATE;
- /* Now check for just-out-of-range dates */
- if (!IS_VALID_DATE(result))
- ereport(ERROR,
- (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("abstime out of range for date")));
- break;
- }
-
- PG_RETURN_DATEADT(result);
-}
-
-
/*****************************************************************************
* Time ADT
*****************************************************************************/