Re: BUG #15141: Faulty ISO 8601 parsing - Mailing list pgsql-bugs

From defanor
Subject Re: BUG #15141: Faulty ISO 8601 parsing
Date
Msg-id 87in996p3q.fsf@uberspace.net
Whole thread Raw
In response to Re: BUG #15141: Faulty ISO 8601 parsing  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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).


pgsql-bugs by date:

Previous
From: defanor
Date:
Subject: Re: BUG #15141: Faulty ISO 8601 parsing
Next
From: Michael Paquier
Date:
Subject: Re: BUG #14999: pg_rewind corrupts control file global/pg_control