Re: roundoff problem in time datatype

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: roundoff problem in time datatype
Дата
Msg-id Pine.LNX.4.44.0509261812420.28238-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: roundoff problem in time datatype  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Vacuum questions...
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: roundoff problem in time datatype