Re: roundoff problem in time datatype

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: roundoff problem in time datatype
Date: 2005-09-26 14:40:03
Message-ID: Pine.LNX.4.44.0509261632010.28238-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 26 Sep 2005, Tom Lane wrote:

> > Yes, and it can go up to 23:59:60.999999 (depending on how many fractional
> > seconds one want).
>
> That's an urban legend. There never have been, and never will be, two
> leap seconds instituted in the same minute. We really should reject
> anything larger than '23:59:60'.

The above is still just one leap second. The time continues to tick until
it wraps over to 00:00:00. So for example a time value of 23:59:60.42
exists if we allow just one leap second.

> > One "solution" is to round '23:59:59.9'::time(0) up to '00:00:00'.
>
> 7.2 did that, and we concluded it was broken.

Doesn't mean that it necissary was a correct conclusion (and I'm not
stating that it was wrong, I would like to think about it for a while
before I claim something like that).

Do the sql standard say anything on the matter?

--
/Dennis Björklund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-26 14:44:33 Re: Server process exited with unexpected status 128.
Previous Message Tom Lane 2005-09-26 14:28:31 Re: roundoff problem in time datatype

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2005-09-26 15:04:13 Re: roundoff problem in time datatype
Previous Message Tom Lane 2005-09-26 14:28:31 Re: roundoff problem in time datatype