BUG #15141: Faulty ISO 8601 parsing

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: defanor(at)uberspace(dot)net
Subject: BUG #15141: Faulty ISO 8601 parsing
Date: 2018-04-02 23:31:09
Message-ID: 152271186941.1442.12179299369295226185@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15141
Logged by: defanor
Email address: defanor(at)uberspace(dot)net
PostgreSQL version: 10.0
Operating system: Any, apparently

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:
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.


Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2018-04-02 23:58:15 Re: BUG #15141: Faulty ISO 8601 parsing
Previous Message Tom Lane 2018-04-02 23:27:55 Re: BUG #14999: pg_rewind corrupts control file global/pg_control