From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: defanor@uberspace.net
Subject: BUG #15141: Faulty ISO 8601 parsing
Date: Mon, 02 Apr 2018 23:31:09 +0000
Message-ID: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15141
Logged by: defanor
Email address: defanor@uberspace.net
PostgreSQL version: 10.0
Operating system: Any, apparently
Description:
The time parsing fails on some valid ISO times, with some locales, e.g.:
# select to_timestamp('2018-04-03T01:45:00,728456785+0000')::timestamp with
time zone;
ERROR: invalid input syntax for type double precision:
"2018-04-03T01:45:00,728456785+0000"
LINE 1: select to_timestamp('2018-04-03T01:45:00,728456785+0000')::t...
^
Apparently the parsing is locale-dependent (using the locale-dependent
strtod function), while ISO 8601 permits both comma and full stop, with a
preference for comma (and without mentioning locales). Would be nice to
handle both, so that any valid ISO times would get parsed.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, defanor@uberspace.net
Subject: Re: BUG #15141: Faulty ISO 8601 parsing
In-Reply-To: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org>
References: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox