Date/Time parsing of ISO 8601 timestamps with commas - Mailing list pgsql-bugs

From Zane Duffield
Subject Date/Time parsing of ISO 8601 timestamps with commas
Date
Msg-id CACMiCkXtic8S50soCVHLsbpw8CbMrwbu4RfR1yUWfDgm+hO6OA@mail.gmail.com
Whole thread Raw
Responses Re: Date/Time parsing of ISO 8601 timestamps with commas
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction
Next
From: Yuri Zamyatin
Date:
Subject: Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade