Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noIyb-0007FW-8J for pgsql-general@arkaria.postgresql.org; Tue, 10 May 2022 06:04:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1noIya-0006FZ-4s for pgsql-general@arkaria.postgresql.org; Tue, 10 May 2022 06:04:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noIyZ-0006EC-Qs for pgsql-general@lists.postgresql.org; Tue, 10 May 2022 06:04:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noIyX-0008GN-AT for pgsql-general@lists.postgresql.org; Tue, 10 May 2022 06:04:02 +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 24A63xjM4043740; Tue, 10 May 2022 02:03:59 -0400 From: Tom Lane To: "David G. Johnston" cc: =?UTF-8?B?5q2j5Y2O5ZCV?= , "pgsql-general@lists.postgresql.org" Subject: Re: Question on cast string to date In-reply-to: References: <4035765.1652157883@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Mon, 09 May 2022 22:40:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4043738.1652162639.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 10 May 2022 02:03:59 -0400 Message-ID: <4043739.1652162639@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Monday, May 9, 2022, Tom Lane wrote: >> If you want to pursue this question, you could start by bisecting >> to find just which commit changed it and why. > Manual history inspection of datetime.c > https://github.com/postgres/postgres/commit/7778ddc7a2d5b006edbfa69cdb44= b8d8c24ec1ff Ah, yeah, that looks plausible -- the previous code allowed 6 digits YYMMDD or 8 digits YYYYMMDD, the new code allowed >=3D 6 digits with 2 or more YY followed by MMDD. So the specific case of YYYMMDD was rejected before and not after. Doesn't seem to have been planned, but it's not so obviously inconsistent that I'd care to break it again nine years later. By now, somebody might be depending on it. regards, tom lane