Re: Bad interval conversion?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: depesz(at)depesz(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bad interval conversion?
Date: 2009-08-18 19:41:39
Message-ID: 27830.1250624499@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alex Hunsaker <badalex(at)gmail(dot)com> writes:
> On Tue, Aug 18, 2009 at 12:07, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2009-08-18 19:43:42 Re: fillfactor hides autovacuum parameters in 8.4.0
Previous Message Alex Hunsaker 2009-08-18 19:36:50 Re: Bad interval conversion?