Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group