From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Interval literal rounding bug(?) and patch. |
Date: | 2008-09-22 19:38:17 |
Message-ID: | 48D7F429.8000007@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
Ron
Attachment | Content-Type | Size |
---|---|---|
intervalrounding.patch | text/x-diff | 3.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-09-22 20:04:25 | Re: Initial prefetch performance testing |
Previous Message | Andrew Dunstan | 2008-09-22 19:05:51 | Re: parallel pg_restore |