Wednesday, September 24, 2008

Re: [HACKERS] Interval literal rounding bug(?) and patch.

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. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: