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 1kNgLP-0002bS-Pj for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 17:56:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNgLO-0007OF-MZ for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2020 17:56:46 +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 1kNgLO-0007O8-G1 for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 17:56:46 +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 1kNgLM-0004WA-E1 for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2020 17:56:45 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kNgLK-0000n3-L6; Wed, 30 Sep 2020 13:56:42 -0400 Date: Wed, 30 Sep 2020 13:56:42 -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: <20200930175642.GC26841@momjian.us> References: <0123b852ae3fe53eca11b9451d035411b06dafd5.camel@cybertec.at> <20200904012149.GA13932@momjian.us> <20200904201224.GD6891@momjian.us> <663099.1601400389@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: <663099.1601400389@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 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 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? You are agreeing with what I am suggesting then? -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee