pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: 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: Wed, 30 Sep 2020 19:26:55 -0400
Message-ID: <943476.1601508415@sss.pgh.pa.us> (raw)
In-Reply-To: <20200930223656.GH26841@momjian.us>
References: <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>
	<20200904201224.GD6891@momjian.us>
	<663099.1601400389@sss.pgh.pa.us>
	<CA+TgmoameT7ysPOm2sqp6NaZtzP0QFNjJ09wC1QVKTzt-84D7Q@mail.gmail.com>
	<911841.1601501743@sss.pgh.pa.us>
	<CA+TgmoaZ9w=WwmE3xRUCN0bSzYp14kU6_MAy-wJUpgpDmVMYpA@mail.gmail.com>
	<20200930223656.GH26841@momjian.us>

Bruce Momjian <bruce@momjian.us> writes:
> On Wed, Sep 30, 2020 at 06:10:38PM -0400, Robert Haas wrote:
>> On Wed, Sep 30, 2020 at 5:35 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> By that logic, we should never fix any bug in a back branch.

>> No, by that logic, we should not change any behavior in a back-branch
>> upon which a customer is plausibly relying. No one relies on a certain
>> query causing a server crash, for example, or a cache lookup failure,
>> so fixing those things can only help people. But there is no reason at
>> all why someone shouldn't be relying on this very old and
>> long-established behavior not to change in a minor release.

> That is an interesting distinction.

I don't want to sound like I'm totally without sympathy for Robert's
argument.  But I do say it's a judgment call, and my judgment remains
that this patch is appropriate to back-patch.

We do not have, and never have had, a project policy against
back-patching non-crash-related behavioral changes.  If we did,
we would not for example put timezone database updates into the
back branches.  It's not terribly hard to imagine such updates
breaking applications that expected the meaning of, say,
'2022-04-01 12:34 Europe/Paris' to hold still.  But we do it
anyway.

As another not-too-old example, I'll cite Robert's own commits
0278d3f79/a08bfe742.  The argument for a back-patch there was
pretty much only that we were writing an alleged tar file that
didn't conform to the letter of the POSIX spec.  It's possible
to imagine that somebody had written bespoke archive-reading
code that failed after we changed the output; but that didn't
seem probable enough to justify continuing to violate the standard.

In this case the "standard" in question is the Oracle-derived
expectation that to_date will read negative years as BC, and
I'd argue that the possibility that someone already has code
that relies on getting an off-by-one result is outweighed by the
likelihood that the misbehavior will hurt somebody in the future.

This calculus would obviously change if we knew of such code
or thought it was really probable for it to exist.  That's
what makes it a judgment call.

			regards, tom lane





view thread (31+ messages)  latest in thread

Message-ID: <943476.1601508415@sss.pgh.pa.us>
Permalink:  ../943476.1601508415@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/943476.1601508415@sss.pgh.pa.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: tgl@sss.pgh.pa.us, bruce@momjian.us, robertmhaas@gmail.com, 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: <943476.1601508415@sss.pgh.pa.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