Re: BUG #15389: Fill zero in milliseconds of a timestamp

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15389: Fill zero in milliseconds of a timestamp
Дата
Msg-id CAKFQuwZjOM4pr5ayBvaev66M6S=fAaeWEvJr=2D0kk7h=BqhGg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15389: Fill zero in milliseconds of a timestamp  (Sergei Kornilov <sk@zsrv.org>)
Ответы Re: BUG #15389: Fill zero in milliseconds of a timestamp
Список pgsql-bugs
On Tuesday, September 18, 2018, Sergei Kornilov <sk@zsrv.org> wrote:
Hello

> I don't think is correct because if I try to convert in Java become 099.
"2014-09-26 17:17:45.099"?
I think Java is incorrect here. Usually trailing zeros can be omitted.
Also postgresql timestamp has resolution 1 microsecond, so with trailing zeros it must be "2014-09-26 17:17:45.990000", not "2014-09-26 17:17:45.990".

Except the decimal in that construct is a simple part separator and not a fractional indicator.  You cannot drop trailing zeros in the last part in the same way you cannot drop trailing zeros when describing one hundred (100) because if you do you get the number one (1) instead.

David J.

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

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re: BUG #15389: Fill zero in milliseconds of a timestamp
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: BUG #15389: Fill zero in milliseconds of a timestamp