]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Ooops, no DATE_IS_NOBEGIN/DATE_IS_NOEND in 8.3 or 8.2 ...
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Dec 2010 04:01:33 +0000 (23:01 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Dec 2010 04:01:33 +0000 (23:01 -0500)
I heard the siren call of git cherry-pick, but should have lashed myself
to the mast.

src/backend/utils/adt/date.c

index 9014c255e871c160bba506b745bcc97d17ace9d1..c58bf10ac1cbb63725bedb755fa3c31e0fabcb7a 100644 (file)
@@ -331,20 +331,13 @@ date2timestamp_no_overflow(DateADT dateVal)
 {
        double  result;
 
-       if (DATE_IS_NOBEGIN(dateVal))
-               result = -DBL_MAX;
-       else if (DATE_IS_NOEND(dateVal))
-               result = DBL_MAX;
-       else
-       {
 #ifdef HAVE_INT64_TIMESTAMP
-               /* date is days since 2000, timestamp is microseconds since same... */
-               result = dateVal * (double) USECS_PER_DAY;
+       /* date is days since 2000, timestamp is microseconds since same... */
+       result = dateVal * (double) USECS_PER_DAY;
 #else
-               /* date is days since 2000, timestamp is seconds since same... */
-               result = dateVal * (double) SECS_PER_DAY;
+       /* date is days since 2000, timestamp is seconds since same... */
+       result = dateVal * (double) SECS_PER_DAY;
 #endif
-       }
 
        return result;
 }