Re: Bad interval conversion? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bad interval conversion?
Date
Msg-id 27830.1250624499@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bad interval conversion?  (Alex Hunsaker <badalex@gmail.com>)
List pgsql-bugs
Alex Hunsaker <badalex@gmail.com> writes:
> On Tue, Aug 18, 2009 at 12:07, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>> Throwing overflow errors doesn't seem very nice either, especially not
>> for values that worked just fine before 8.4.

> I just checked both 8.3.7 and 8.2.13 give:
> # select '4817191.623 ms'::interval;
>     interval
> ------------------
>  -00:35:47.483648
> (1 row)

Presumably you mean "8.3.7 and 8.2.13 built with the nonstandard
--enable-integer-datetimes option".  The reason I find this a big issue
is that the default behavior has changed as of 8.4.  We'll want to
back-patch of course, but the point is that these cases do work as
expected under float timestamps.

> Ok I looked around at the other fsec assignments in adt/ and did not
> see any that were not treating them as fractional correctly.  This
> seems to be the only case.  Anywho is the below more what you
> expected? (I decided to do it for the floating point case as well...)

I'll take a closer look later, but it seems reasonably sane at first
glance.  Thanks for doing the legwork!

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: Bad interval conversion?
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: fillfactor hides autovacuum parameters in 8.4.0