Re: roundoff problem in time datatype - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: roundoff problem in time datatype
Date
Msg-id Pine.LNX.4.44.0509261812420.28238-100000@zigo.dhs.org
Whole thread Raw
In response to Re: roundoff problem in time datatype  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 26 Sep 2005, Tom Lane wrote:

>             b) If SD is TIME WITHOUT TIME ZONE, then TV is SV, with
>               implementation-defined rounding or truncation if necessary.
> 
> So it's "implementation-defined" what we do.

Truncation would avoid the problem but of course loses some of the info.

So, what are the alternatives:

* Truncation.

* Rounding and let it wrap when rounding up towards midnight.

* Rounding and never let it wrap. The cases that would wrap goes to 23:59:59 (or 23:59:59.9 and so on for other
precisions)or to 23:59:60 (or 23:59.60.9 and so on) if one start with a leap second time.
 

Are there any more viable cases?
-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Vacuum questions...
Next
From: Andreas Pflug
Date:
Subject: Re: roundoff problem in time datatype