pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: BUG #16419: wrong parsing BC year in to_date() function
Date: Fri, 4 Sep 2020 16:12:24 -0400
Message-ID: <20200904201224.GD6891@momjian.us> (raw)
In-Reply-To: <CAKFQuwZV0UxbyYTxuJhf1j1X=3HG5QA6qtEp+C+=LzOFtNEt3A@mail.gmail.com>
References: <16419-d8d9db0a7553f01b@postgresql.org>
	<CAKFQuwYPjq=UAHNZ6KtHuJPA8pmttV3X+imFYcBQqNUGWsCexg@mail.gmail.com>
	<AM0PR03MB3570F99911704BFC77294DA1BFA50@AM0PR03MB3570.eurprd03.prod.outlook.com>
	<CAKFQuwaXESne_VYt8bE8L5gGGqEM0TCGL+JNL1a8NJ2_uc8VfQ@mail.gmail.com>
	<CAKFQuwajC7+s-nHRujP+w5GsUTcp8usazdPas59Kz3kCTq+e3w@mail.gmail.com>
	<0123b852ae3fe53eca11b9451d035411b06dafd5.camel@cybertec.at>
	<CAKFQuwb_3yNTTE6cG_YtXFtV=CkQf0uMSMB0oxC1YNrF94pfuA@mail.gmail.com>
	<20200904012149.GA13932@momjian.us>
	<CAKFQuwZV0UxbyYTxuJhf1j1X=3HG5QA6qtEp+C+=LzOFtNEt3A@mail.gmail.com>

On Fri, Sep  4, 2020 at 12:45:36PM -0700, David G. Johnston wrote:
> On Thu, Sep 3, 2020 at 6:21 PM Bruce Momjian <bruce@momjian.us> wrote:
> 
>     On Wed, Jul 15, 2020 at 09:26:53AM -0700, David G. Johnston wrote:
> 
>     > Whether to actually change the behavior of to_date is up for debate
>     though I
>     > would presume it would not be back-patched.
> 
>     OK, so, looking at this thread, we have to_date() treating -1 as -2 BC,
>     make_date() treating -1 as 1 BC, and we have Oracle, which to_date() is
>     supposed to match, making -1 as 1 BC.
> 
>     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.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

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






view thread (31+ messages)  latest in thread

Message-ID: <20200904201224.GD6891@momjian.us>
Permalink:  ../20200904201224.GD6891@momjian.us/
Also on:    postgresql.org/message-id/20200904201224.GD6891@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, david.g.johnston@gmail.com, laurenz.albe@cybertec.at, pgsql-hackers@lists.postgresql.org
  Subject: Re: BUG #16419: wrong parsing BC year in to_date() function
  In-Reply-To: <20200904201224.GD6891@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox