Re: roundoff problem in time datatype
От | Tom Lane |
---|---|
Тема | Re: roundoff problem in time datatype |
Дата | |
Msg-id | 284.1127754021@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: roundoff problem in time datatype (Andreas Pflug <pgadmin@pse-consulting.de>) |
Ответы |
Re: roundoff problem in time datatype
|
Список | pgsql-hackers |
Andreas Pflug <pgadmin@pse-consulting.de> writes: > 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. > IMHO Since 23:59:59.99 probably means "the last milliseconds of this > day, as far as precision allows to express it", this should be truncated > to 23:59:59, not rounded to 24:00:00. Until the last microsecond has > elapsed, it's not 24 hours (you wouldn't round "happy new year" at > 23:59:30 from a clock with minutes only either) Hm, so the proposal is "round unless that would produce 24:00:00, in which case truncate"? Seems a bit ugly but it would follow the letter of the spec, and avoid rejecting inputs that we used to accept. It's still not very clear what to do with '23:59:60.9' though. regards, tom lane
В списке pgsql-hackers по дате отправления: