Re: BUG #16419: wrong parsing BC year in to_date() function

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16419: wrong parsing BC year in to_date() function
Date: 2020-09-30 18:42:16
Message-ID: 20200930184216.GE26841@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Sep 30, 2020 at 02:11:54PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Tue, Sep 29, 2020 at 01:26:29PM -0400, Tom Lane wrote:
> >> Bruce Momjian <bruce(at)momjian(dot)us> 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 <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniele Varrazzo 2020-09-30 18:50:15 PostgreSQL 9.6 fails to install on Ubuntu
Previous Message Michael Weber 2020-09-30 18:20:44 Bugreport | Logical replication PostgreSQL 12 | Error after disable / enable replication

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-30 18:50:31 Re: BUG #16419: wrong parsing BC year in to_date() function
Previous Message Tom Lane 2020-09-30 18:11:54 Re: BUG #16419: wrong parsing BC year in to_date() function