Dmitry Tkach <[EMAIL PROTECTED]> writes:
> In 7.3 (and 7.4) timestamptz_date () is still doing that (and select 
> '1999-12-31 00:00:01'::timestamptz::date still works),
> *but* timestamp_date() is changed for some reason to just divide the 
> timestamp by the number of microseconds per day, that is obviously wrong 
> for the case when ts is negative (before 2000) because integer division 
> (unlike floor ())  truncates towards zero...

Good catch.  It looks like Tom Lockhart changed this routine when he was
adding the int64-timestamp option.  He probably had a momentary brain
fade about the direction of rounding needed :-(

I've changed it back to doing things the 7.2 way in CVS tip.  This will
be in 7.3.4 unless Marc already wrapped the tarball, which I don't think
he did.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to