Date/Time parsing of ISO 8601 timestamps with commas

Поиск
Список
Период
Сортировка
От Zane Duffield
Тема Date/Time parsing of ISO 8601 timestamps with commas
Дата
Msg-id CACMiCkXtic8S50soCVHLsbpw8CbMrwbu4RfR1yUWfDgm+hO6OA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Date/Time parsing of ISO 8601 timestamps with commas
Список pgsql-bugs
I noticed today that PostgreSQL doesn't support parsing ISO 8601 timestamps that use a comma as the decimal separator.

The section of the standard that describes this is 4.2.2.4
the decimal fraction shall be divided from the integer part by the decimal sign specified in ISO 31-0, i.e. the comma [,] or full stop [.]. Of these, the comma is the preferred sign

I noticed this issue because a script I wrote used the unix `date` command to generate a timestamp (later fed into PostgreSQL)
$ date --iso-8601=ns
2025-10-10T10:38:59,386724473+11:00

I read over the documentation for Date/Time types: https://www.postgresql.org/docs/18/datatype-datetime.html
Date and time input is accepted in almost any reasonable format, including ISO 8601

but there is no clarification on this page that the comma is not supported as the decimal separator.

Thanks,
Zane

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