BUG #15141: Faulty ISO 8601 parsing

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #15141: Faulty ISO 8601 parsing
Дата
Msg-id 152271186941.1442.12179299369295226185@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #15141: Faulty ISO 8601 parsing  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #15141: Faulty ISO 8601 parsing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15141: Faulty ISO 8601 parsing