Ooops, no DATE_IS_NOBEGIN/DATE_IS_NOEND in 8.3 or 8.2 ...
I heard the siren call of git cherry-pick, but should have lashed myself to the mast.
This commit is contained in:
parent
1fa37ac25d
commit
2892fd5dea
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user