On Sep 1, 2006, at 11:31 , Bruce Momjian wrote:

Tom Lane wrote:
Bruce Momjian <[EMAIL PROTECTED]> writes:
I am unclear about this report. The patch was not meant to fix every
interval issue, but merely to improve multiplication and division
computations.  Does it do that?

According to Michael's last report, your patch fails under
--enable-integer-datetimes.

Where does it fail?  Here?

        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 11 days 146:24:00 | -1 years -11 days +69:36:00 | -1 years -5
        days +98:24:00 | -1 years -11 days -146:23:60.00
                                                -----

That is wrong, but I think we need another fix for that.  Notice the
problem is in minutes/seconds, not hours.

I was sure it was more wrong than that the first time I saw it, but looks like I can't be sure of anything today :(. I need more sleep. Sorry for the noise on this one.

Off work now, so I'm back at it.

Michael Glaesemann
grzm seespotcode net




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to