From: | Zane Duffield <duffieldzane(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Date/Time parsing of ISO 8601 timestamps with commas |
Date: | 2025-10-09 23:43:04 |
Message-ID: | CACMiCkXtic8S50soCVHLsbpw8CbMrwbu4RfR1yUWfDgm+hO6OA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Yuri Zamyatin | 2025-10-10 01:34:47 | Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade |
Previous Message | Tom Lane | 2025-10-09 17:17:52 | Re: BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction |