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 1kNh3W-0004VM-H3 for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 18:42:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNh3V-0005Y5-Cz for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 18:42:21 +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 1kNh3V-0005Xx-5x for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 18:42:21 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNh3T-0004wH-1c for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 18:42:20 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kNh3Q-0005QT-J7; Wed, 30 Sep 2020 14:42:16 -0400 Date: Wed, 30 Sep 2020 14:42:16 -0400 From: Bruce Momjian To: Tom Lane Cc: "David G. Johnston" , Laurenz Albe , PostgreSQL Hackers Subject: Re: BUG #16419: wrong parsing BC year in to_date() function Message-ID: <20200930184216.GE26841@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> <888835.1601489514@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <888835.1601489514@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Sep 30, 2020 at 02:11:54PM -0400, Tom Lane wrote: > 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 the > >>>> incompatibility in the release notes. > > >>> I agree that someone else should write another patch to fix the behavior for > >>> v14.  Still suggest committing the proposed patch to master and all supported > >>> versions to document the existing behavior correctly.  The fix patch 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. Yes, I was thinking just the major release notes. What are you suggesting, and what did you ultimately decide to do? What I didn't want to do was to document the old behavior in the old docs and change it in PG 14. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee