Re: Have I found an interval arithmetic bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Bryn Llewellyn <bryn(at)yugabyte(dot)com>, pgsql-hackers list <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Have I found an interval arithmetic bug?
Date: 2021-07-27 20:01:54
Message-ID: 456756.1627416114@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> I went ahead and modified the interval multiplication/division functions
> to use the same logic as fractional interval units:

Wait. A. Minute.

What I think we have consensus on is that interval_in is doing the
wrong thing in a particular corner case. I have heard nobody but
you suggesting that we should start undertaking behavioral changes
in other interval functions, and I don't believe that that's a good
road to start going down. These behaviors have stood for many years.
Moreover, since the whole thing is by definition operating with
inadequate information, it is inevitable that for every case you
make better there will be another one you make worse.

I'm really not on board with changing anything except interval_in,
and even there, we had better be certain that everything we change
is a case that is certainly being made better.

BTW, please do not post patches as gzipped attachments, unless
they're enormous. You're just adding another step making it
harder for people to look at them.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2021-07-27 21:13:14 Re: Have I found an interval arithmetic bug?
Previous Message Bruce Momjian 2021-07-27 19:36:14 Re: Have I found an interval arithmetic bug?

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-07-27 20:17:28 Re: pg_settings.pending_restart not set when line removed
Previous Message Bruce Momjian 2021-07-27 19:36:14 Re: Have I found an interval arithmetic bug?