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: Robert Haas <robertmhaas(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, John W Higgins <wishdev(at)gmail(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-30 20:44:06
Message-ID: 1121972.1627677846@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:
> On Fri, Jul 30, 2021 at 03:54:42PM -0400, Tom Lane wrote:
>> Having said that, I also agree that it's not great that '1.4 years'
>> is converted to '1 year 4 mons' (1.33333... years) rather than
>> '1 year 5 mons' (1.41666... years). The latter seems like a clearly
>> saner translation. I would really rather that we reject such input
>> altogether, but if we're going to accept it, we should round not
>> truncate.

> My patch returns what you want:

Yeah, as far as that point goes, I was replying to Robert's
objection not your patch.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-07-31 05:38:38 Re: Postgres 9.6 to 12.7 pg_upgrade error - terminating connection due to administrator command
Previous Message Bruce Momjian 2021-07-30 19:56:49 Re: Have I found an interval arithmetic bug?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-07-30 21:00:30 Re: Corrected documentation of data type for the logical replication message formats.
Previous Message Andres Freund 2021-07-30 20:38:53 Re: Use generation context to speed up tuplesorts