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 1pSRox-0007xa-FS for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Feb 2023 00:08:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSRow-0001z0-CL for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Feb 2023 00:08:18 +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 1pSRow-0001yq-3f for pgsql-bugs@lists.postgresql.org; Thu, 16 Feb 2023 00:08:18 +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 1pSRoq-00088a-1F for pgsql-bugs@lists.postgresql.org; Thu, 16 Feb 2023 00:08:17 +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 31G08AjW2155071; Wed, 15 Feb 2023 19:08:10 -0500 From: Tom Lane To: "David G. Johnston" cc: postgresql@richardneill.org, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17794: dates with zero or negative years are not accepted In-reply-to: References: <17794-1ddd1f50f9df08a1@postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Wed, 15 Feb 2023 16:03:07 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2155069.1676506090.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 15 Feb 2023 19:08:10 -0500 Message-ID: <2155070.1676506090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > We just stopped doing this "shift-by-one" in probably the one arguable c= ase > where doing so made sense. > https://github.com/postgres/postgres/commit/489c9c3407cbfd473c2f8d7863ff= aaf6d2e8fcf8 Hmm, yeah, we should have suggested to_date as an alternative. Its use of a format string makes the parsing problem more tractable. regards, tom lane