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 1kNJOl-00085q-96 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Sep 2020 17:26:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNJOi-0005Fr-Cn for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Sep 2020 17:26:40 +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 1kNJOi-0005Fk-1I for pgsql-hackers@lists.postgresql.org; Tue, 29 Sep 2020 17:26:40 +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 1kNJOb-0001Cz-SR for pgsql-hackers@lists.postgresql.org; Tue, 29 Sep 2020 17:26:39 +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 08THQTv3663100; Tue, 29 Sep 2020 13:26:29 -0400 From: Tom Lane To: Bruce Momjian cc: "David G. Johnston" , Laurenz Albe , PostgreSQL Hackers Subject: Re: BUG #16419: wrong parsing BC year in to_date() function In-reply-to: <20200904201224.GD6891@momjian.us> References: <16419-d8d9db0a7553f01b@postgresql.org> <0123b852ae3fe53eca11b9451d035411b06dafd5.camel@cybertec.at> <20200904012149.GA13932@momjian.us> <20200904201224.GD6891@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 04 Sep 2020 16:12:24 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <663098.1601400389.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 29 Sep 2020 13:26:29 -0400 Message-ID: <663099.1601400389@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > On Fri, Sep 4, 2020 at 12:45:36PM -0700, David G. Johnston wrote: >>> Because we already have the to_date/make_date inconsistency, and the -= 1 >>> to -2 BC mapping is confusing, and doesn't match Oracle, I think the >>> clean solution is to change PG 14 to treat -1 as 1 BC, and document th= e >>> incompatibility in the release notes. >> I agree that someone else should write another patch to fix the behavio= r for >> v14.=C2=A0 Still suggest committing the proposed patch to master and al= l supported >> versions to document the existing behavior correctly.=C2=A0 The fix pat= ch can work >> from that. > I think we need to apply the patches to all branches at the same time. = > I am not sure we want to document a behavior we know will change in PG > 14. I think this is nuts. The current behavior is obviously broken; we should just treat it as a bug and fix it, including back-patching. I do not think there is a compatibility problem of any significance. Who out there is going to have an application that is relying on the ability to insert BC dates in this way? regards, tom lane