Re: Interval literal rounding bug(?) and patch. - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Interval literal rounding bug(?) and patch.
Date
Msg-id 200809241946.m8OJksv28020@momjian.us
Whole thread Raw
In response to Interval literal rounding bug(?) and patch.  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
List pgsql-hackers
Ron Mayer wrote:
> I think it's a bug that these 3 different ways of writing 0.7 seconds
> produce different results from each other on HEAD.
> 
> head=# select interval '0:0:0.7', interval '@ 0.70 secs', interval '0.7 seconds';
>    interval   |    interval     |    interval
> -------------+-----------------+-----------------
>   00:00:00.70 | 00:00:00.699999 | 00:00:00.699999
> (1 row)
> 
> The attached patch will make all of those output "00:00:00.70" which.
> 
> Postgres 8.3 tended to output the "00:00:00.70" like this patch, I believe
> because it didn't default to HAVE_INT64_TIMESTAMP like HEAD is.   The patch
> seems to pass the existing regression tests.
> 
> Does this seem reasonable?

Yes, very nice;  patch applied.  Thanks.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)
Next
From: Tom Lane
Date:
Subject: Re: FSM, now without WAL-logging