Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3Fw7-0003Le-FP for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Apr 2018 07:00:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3Fw6-0003q0-F3 for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Apr 2018 07:00:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3Azf-0008Ul-5E for pgsql-bugs@lists.postgresql.org; Tue, 03 Apr 2018 01:44:15 +0000 Received: from cupcake.uberspace.net ([2a02:7aa0:1201::60f2:3a9d]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3Azb-0000AC-Ni for pgsql-bugs@lists.postgresql.org; Tue, 03 Apr 2018 01:44:14 +0000 Received: by cupcake.uberspace.net (Postfix, from userid 1000) id 2F61A63869; Tue, 3 Apr 2018 01:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uberspace.net; s=default; t=1522719850; bh=w/1Wj9bMctou99NPX2Rdm3HgfXIQm6JaZnnhoL399ds=; h=References:From:To:Subject:In-reply-to:Date; b=nAXVeBqiiQgQY6adFdGolnDH4SPSCGr4krj9C77AuXrBQkrXPDRAJAbFx7+MZ1zE6 MaQg3xyIkuu6vCVfMgo/3qxBpHEOUJvxrIOe1Q+aNp5ysLb5hnQlC1ps8uEmbypLuA 0olWrj+4ffpO8WSB6HzdTI/Vg85a2HqGVdvtKnfY= References: <152271186941.1442.12179299369295226185@wrigleys.postgresql.org> <32337.1522714669@sss.pgh.pa.us> User-agent: mu4e 0.9.16; emacs 25.3.1 From: defanor To: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15141: Faulty ISO 8601 parsing In-reply-to: <32337.1522714669@sss.pgh.pa.us> Date: Tue, 03 Apr 2018 04:44:09 +0300 Message-ID: <87in996p3q.fsf@uberspace.net> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > (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).