diff options
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/adt/date.c | 8 | ||||
-rw-r--r-- | src/backend/utils/adt/datetime.c | 20 | ||||
-rw-r--r-- | src/backend/utils/adt/timestamp.c | 22 |
3 files changed, 0 insertions, 50 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 1ff3cfea8b9..e440a4fedd7 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -138,14 +138,6 @@ date_in(PG_FUNCTION_ARGS) case DTK_DATE: break; - case DTK_CURRENT: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); - - GetCurrentDateTime(tm); - break; - case DTK_EPOCH: GetEpochTime(tm); break; diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 9def318c57d..e9add385ba5 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -99,7 +99,6 @@ static const datetkn datetktbl[] = { {"aug", MONTH, 8}, {"august", MONTH, 8}, {DB_C, ADBC, BC}, /* "bc" for years <= 0 */ - {DCURRENT, RESERV, DTK_CURRENT}, /* "current" is always now */ {"d", UNITS, DTK_DAY}, /* "day of month" for ISO input */ {"dec", MONTH, 12}, {"december", MONTH, 12}, @@ -113,7 +112,6 @@ static const datetkn datetktbl[] = { {"friday", DOW, 5}, {"h", UNITS, DTK_HOUR}, /* "hour" */ {LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */ - {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */ {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */ {"isoyear", UNITS, DTK_ISOYEAR}, /* year in terms of the ISO week date */ {"j", UNITS, DTK_JULIAN}, @@ -157,7 +155,6 @@ static const datetkn datetktbl[] = { {"tue", DOW, 2}, {"tues", DOW, 2}, {"tuesday", DOW, 2}, - {"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */ {"wed", DOW, 3}, {"wednesday", DOW, 3}, {"weds", DOW, 3}, @@ -191,7 +188,6 @@ static const datetkn deltatktbl[] = { {"hours", UNITS, DTK_HOUR}, /* "hours" relative */ {"hr", UNITS, DTK_HOUR}, /* "hour" relative */ {"hrs", UNITS, DTK_HOUR}, /* "hours" relative */ - {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */ {"m", UNITS, DTK_MINUTE}, /* "minute" relative */ {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */ @@ -222,7 +218,6 @@ static const datetkn deltatktbl[] = { {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */ {"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */ {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */ - {"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */ {"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */ {DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */ @@ -1186,14 +1181,6 @@ DecodeDateTime(char **field, int *ftype, int nf, case RESERV: switch (val) { - case DTK_CURRENT: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); - - return DTERR_BAD_FORMAT; - break; - case DTK_NOW: tmask = (DTK_DATE_M | DTK_TIME_M | DTK_M(TZ)); *dtype = DTK_DATE; @@ -2097,13 +2084,6 @@ DecodeTimeOnly(char **field, int *ftype, int nf, case RESERV: switch (val) { - case DTK_CURRENT: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"current\" is no longer supported"))); - return DTERR_BAD_FORMAT; - break; - case DTK_NOW: tmask = DTK_TIME_M; *dtype = DTK_TIME; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 853a8dc49a4..5861ffbbc97 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -188,14 +188,6 @@ timestamp_in(PG_FUNCTION_ARGS) TIMESTAMP_NOBEGIN(result); break; - case DTK_INVALID: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); - - TIMESTAMP_NOEND(result); - break; - default: elog(ERROR, "unexpected dtype %d while parsing timestamp \"%s\"", dtype, str); @@ -439,14 +431,6 @@ timestamptz_in(PG_FUNCTION_ARGS) TIMESTAMP_NOBEGIN(result); break; - case DTK_INVALID: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); - - TIMESTAMP_NOEND(result); - break; - default: elog(ERROR, "unexpected dtype %d while parsing timestamptz \"%s\"", dtype, str); @@ -946,12 +930,6 @@ interval_in(PG_FUNCTION_ARGS) errmsg("interval out of range"))); break; - case DTK_INVALID: - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("date/time value \"%s\" is no longer supported", str))); - break; - default: elog(ERROR, "unexpected dtype %d while parsing interval \"%s\"", dtype, str); |