Interval precision busted?

Started by Tom Laneover 23 years ago2 messages
#1Tom Lane
tgl@sss.pgh.pa.us

In current sources (compiled without --enable-integer-datetimes) I get

regression=# select interval(0) '1 day 23:44:55.667677' ;
interval
-----------------------
1 day 23:44:55.667677
(1 row)

I was expecting it to round off ... I think there's something wrong with
the arithmetic in AdjustIntervalForTypmod.

regards, tom lane

#2Thomas Lockhart
thomas@fourpalms.org
In reply to: Tom Lane (#1)
Re: Interval precision busted?

I was expecting it to round off ... I think there's something wrong with
the arithmetic in AdjustIntervalForTypmod.

Yup. I've now updated the lookup tables used for the calculation for the
--disable-integer-datetimes case. The --enable-integer-datetimes case
was already calculated correctly. Regression tests don't pass, but that
is a locale problem.

Thanks for noticing the problem.

- Thomas