Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4LT-00DKAV-Bl for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jun 2024 17:16:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sL4LQ-00COCy-K7 for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jun 2024 17:16:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4LQ-00COCq-A1 for pgsql-hackers@lists.postgresql.org; Sat, 22 Jun 2024 17:16:08 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4LL-0030xc-8g for pgsql-hackers@lists.postgresql.org; Sat, 22 Jun 2024 17:16:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 45MHFx7p788149; Sat, 22 Jun 2024 13:15:59 -0400 From: Tom Lane To: "David E. Wheeler" cc: PostgreSQL Hackers Subject: Re: Inconsistent Parsing of Offsets with Seconds In-reply-to: References: Comments: In-reply-to "David E. Wheeler" message dated "Sat, 22 Jun 2024 12:25:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <788147.1719076559.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 22 Jun 2024 13:15:59 -0400 Message-ID: <788148.1719076559@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David E. Wheeler" writes: > The treatment of timestamptz (and timetz) values with offsets that inclu= de seconds seems a bit inconsistent. It's hard to get excited about this. Per the IANA TZ data, nowhere in the world has used fractional-minute UT offsets since 1972: # In 1972 Liberia was the last country to switch from a UT offset # that was not a multiple of 15 or 20 minutes. and they were twenty years later than the next-to-last place (although IANA will steadfastly deny reliability for their TZ data before 1970). So timestamps like this simply don't exist in the wild. > The corresponding jsonpath methods don=E2=80=99t like offsets with secon= ds *at all*: Perhaps that should be fixed, but it's pretty low-priority IMO. I doubt there is any standard saying that JSON timestamps need to be able to include that. > I see from the source[1] that offsets between plus or minus 15:59:59 > are allowed; should the `OF` and `TZ formats be able to parse them? I'd vote no. to_date/to_char already have enough trouble with format strings being squishier than one might expect. regards, tom lane