pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: defanor <defanor@uberspace.net>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15141: Faulty ISO 8601 parsing
Date: Tue, 03 Apr 2018 04:44:09 +0300
Message-ID: <87in996p3q.fsf@uberspace.net> (raw)
In-Reply-To: <32337.1522714669@sss.pgh.pa.us>
References: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org>
	<32337.1522714669@sss.pgh.pa.us>

> (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).




view thread (7+ messages)  latest in thread

Message-ID: <87in996p3q.fsf@uberspace.net>
Permalink:  ../87in996p3q.fsf@uberspace.net/
Also on:    postgresql.org/message-id/87in996p3q.fsf@uberspace.net

 · 

reply

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: defanor@uberspace.net
  Subject: Re: BUG #15141: Faulty ISO 8601 parsing
  In-Reply-To: <87in996p3q.fsf@uberspace.net>
  References: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org> <32337.1522714669@sss.pgh.pa.us> <87in996p3q.fsf@uberspace.net>

* 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