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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

Next:From: Greg StarkDate: 2005-09-26 15:04:13
Subject: Re: roundoff problem in time datatype
Previous:From: Tom LaneDate: 2005-09-26 14:28:31
Subject: Re: roundoff problem in time datatype

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