Re: BUG #15141: Faulty ISO 8601 parsing

From: defanor <defanor(at)uberspace(dot)net>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15141: Faulty ISO 8601 parsing
Date: 2018-04-03 01:44:09
Message-ID: 87in996p3q.fsf@uberspace.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> (Also, this is not the only aspect of 8601 that we don't support;
> for instance the option to specify fractional minutes or hours
> instead of fractional seconds. There again, I think the potential
> for confusion and error outweighs any benefit from being nominally
> more standards-compliant.)
>
> You probably could read data formatted this way using the two-argument
> form of to_timestamp() with a suitable format string.

FWIW, the use case on which I've stumbled onto that was use of COPY: as
I understand it, to_timestamp() won't help there, and it's not just
about standards compliance for the sake of it; when reading
(particularly test data) from stdin or a program, it is tempting to use
date(1) from a shell script, or arbitrary ISO 8601 formatting functions.
It's not hard to get around that either, but still would be nice to be
able to rely on standard formats being handled (or perhaps to see it
mentioned in the docs that the support is incomplete).

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-04-03 02:41:10 Re: BUG #14999: pg_rewind corrupts control file global/pg_control
Previous Message defanor 2018-04-03 01:27:21 Re: BUG #15141: Faulty ISO 8601 parsing