1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

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
This commit is contained in:
Andres Freund
2018-09-28 15:21:48 -07:00
parent 2d10defa77
commit cda6a8d01d
41 changed files with 29 additions and 3318 deletions

View File

@ -137,7 +137,6 @@
#include "utils/fmgroids.h"
#include "utils/index_selfuncs.h"
#include "utils/lsyscache.h"
#include "utils/nabstime.h"
#include "utils/pg_locale.h"
#include "utils/rel.h"
#include "utils/selfuncs.h"
@ -4156,11 +4155,8 @@ convert_to_scalar(Datum value, Oid valuetypid, double *scaledvalue,
*/
case TIMESTAMPOID:
case TIMESTAMPTZOID:
case ABSTIMEOID:
case DATEOID:
case INTERVALOID:
case RELTIMEOID:
case TINTERVALOID:
case TIMEOID:
case TIMETZOID:
*scaledvalue = convert_timevalue_to_scalar(value, valuetypid,
@ -4583,9 +4579,6 @@ convert_timevalue_to_scalar(Datum value, Oid typid, bool *failure)
return DatumGetTimestamp(value);
case TIMESTAMPTZOID:
return DatumGetTimestampTz(value);
case ABSTIMEOID:
return DatumGetTimestamp(DirectFunctionCall1(abstime_timestamp,
value));
case DATEOID:
return date2timestamp_no_overflow(DatumGetDateADT(value));
case INTERVALOID:
@ -4600,16 +4593,6 @@ convert_timevalue_to_scalar(Datum value, Oid typid, bool *failure)
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 TINTERVALOID:
{
TimeInterval tinterval = DatumGetTimeInterval(value);
if (tinterval->status != 0)
return ((tinterval->data[1] - tinterval->data[0]) * 1000000.0);
return 0; /* for lack of a better idea */
}
case TIMEOID:
return DatumGetTimeADT(value);
case TIMETZOID: