1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-22 21:53:06 +03:00

Remove DATEDEBUG because it didn't look Y2K safe, and fix timestamp elog

to be Y2K safe.
This commit is contained in:
Bruce Momjian
2000-01-02 01:37:28 +00:00
parent eb9bb3de33
commit 7a877dfd2d
5 changed files with 7 additions and 386 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.38 1999/09/21 20:58:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.39 2000/01/02 01:37:26 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
@@ -142,10 +142,6 @@ reltimein(char *str)
|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
elog(ERROR, "Bad reltime external representation '%s'", str);
#ifdef DATEDEBUG
printf("reltimein- %d fields are type %d (DTK_DATE=%d)\n", nf, dtype, DTK_DATE);
#endif
switch (dtype)
{
case DTK_DELTA:
@@ -351,11 +347,6 @@ timespan_reltime(TimeSpan *timespan)
span = (((((double) 365 * year) + ((double) 30 * month)) * 86400) + timespan->time);
#ifdef DATEDEBUG
printf("timespan_reltime- convert m%d s%f to %f [%d %d]\n",
timespan->month, timespan->time, span, INT_MIN, INT_MAX);
#endif
time = (((span > INT_MIN) && (span < INT_MAX)) ? span : INVALID_RELTIME);
}