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 1kNgaE-0003G3-0K for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 18:12:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNgaC-0001Vx-VN for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 18:12:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNgaC-0001Vq-OG for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 18:12:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNga6-0008Gm-GO for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 18:12:04 +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 08UIBsLx888836; Wed, 30 Sep 2020 14:11:54 -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: <20200930175642.GC26841@momjian.us> References: <0123b852ae3fe53eca11b9451d035411b06dafd5.camel@cybertec.at> <20200904012149.GA13932@momjian.us> <20200904201224.GD6891@momjian.us> <663099.1601400389@sss.pgh.pa.us> <20200930175642.GC26841@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 30 Sep 2020 13:56:42 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <888834.1601489514.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Sep 2020 14:11:54 -0400 Message-ID: <888835.1601489514@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > On Tue, Sep 29, 2020 at 01:26:29PM -0400, Tom Lane wrote: >> 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 t= he >>>> incompatibility in the release notes. >>> I agree that someone else should write another patch to fix the behavi= or for >>> v14.=C2=A0 Still suggest committing the proposed patch to master and a= ll supported >>> versions to document the existing behavior correctly.=C2=A0 The fix pa= tch can work >>> from that. >> 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? > You are agreeing with what I am suggesting then? Hm, I read your reference to "the release notes" as suggesting that we should change it only in a major release, ie HEAD only (and it looks like David read it the same). If you meant minor release notes, then we're on the same page. regards, tom lane