From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paesold <mpaesold(at)gmx(dot)at>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Interval aggregate regression failure (expected seems |
Date: | 2006-08-29 16:22:46 |
Message-ID: | 56E37AA9-048A-422B-AA26-E0A1F09314F0@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Aug 30, 2006, at 1:13 , Bruce Momjian wrote:
> Uh, I came up with a cleaner one, I think. I didn't test
> --enable-integer-datetimes yet.
Cool. It's indeed much cleaner. Thanks, Bruce. I'm about to head to
bed, but I'll look at it more closely tomorrow.
I also noticed that my regression tests didn't exercise the code I
thought it did. If you have a chance before I get to it, you might
want to try these as well:
select interval '41 mon 12 days 360:00' / 10 as quotient_a
, interval '41 mon -12 days -360:00' / 10 as quotient_b
, interval '-41 mon 12 days 360:00' / 10 as quotient_c
, interval '-41 mon -12 days -360:00' / 10 as quotient_d;
quotient_a | quotient_b |
quotient_c | quotient_d
------------------------+-------------------------
+---------------------------+---------------------------
4 mons 4 days 40:48:00 | 4 mons 2 days -40:48:00 | -4 mons -2 days
+40:48:00 | -4 mons -4 days -40:48:00
(1 row)
select interval '41 mon 12 days 360:00' * 0.3 as product_a
, interval '41 mon -12 days -360:00' * 0.3 as product_b
, interval '-41 mon 12 days 360:00' * 0.3 as product_c
, interval '-41 mon -12 days -360:00' * 0.3 as product_d;
product_a | product_b |
product_c | product_d
--------------------------+-----------------------------
+-----------------------------+---------------------------------
1 year 12 days 122:24:00 | 1 year 6 days -122:23:60.00 | -1 years -6
days +122:24:00 | -1 years -12 days -122:23:60.00
(1 row)
The quotients look fine, but I'm wondering if another set of rounding
is needed to bump those -122:23:60.00 to -122:24:00 in product_b and
product_d.
Michael Glaesemann
grzm seespotcode net
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2006-08-29 16:39:23 | Re: stats test on Windows is now failing repeatably? |
Previous Message | Bruce Momjian | 2006-08-29 16:13:11 | Re: [HACKERS] Interval aggregate regression failure |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-08-29 17:15:25 | Re: Updatable views |
Previous Message | Bruce Momjian | 2006-08-29 16:13:11 | Re: [HACKERS] Interval aggregate regression failure |