Re: BUG #1927: incorrect timestamp returned

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BUG #1927: incorrect timestamp returned
Дата
Msg-id 200510041547.j94FlbL19960@candle.pha.pa.us
обсуждение исходный текст
Ответ на BUG #1927: incorrect timestamp returned  ("Deyan Chepishev" <updates@blue-edge.bg>)
Список pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Right.  We allow leap seconds for any date/time.  Are you saying we
> > should only allow them for certain dates/times?
>
> No, his point is the funny roundoff behavior.
>
> regression=# select timestamp '2005-09-23 23:59:59.999999';
>          timestamp
> ----------------------------
>  2005-09-23 23:59:59.999999
> (1 row)
>
> regression=# select timestamp '2005-09-23 23:59:59.9999999';
>        timestamp
> ------------------------
>  2005-09-23 23:59:60.00
> (1 row)
>
> regression=# select timestamp '2005-09-23 23:59:59.99999999';
>       timestamp
> ---------------------
>  2005-09-24 00:00:00
> (1 row)

Wow, that is funny roundoff behavior.  Has anyone researched the cause?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #1927: incorrect timestamp returned
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1927: incorrect timestamp returned