Re: Have I found an interval arithmetic bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Have I found an interval arithmetic bug?
Date
Msg-id 1121972.1627677846@sss.pgh.pa.us
Whole thread Raw
In response to Re: Have I found an interval arithmetic bug?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Use generation context to speed up tuplesorts
Next
From: Tom Lane
Date:
Subject: Re: Corrected documentation of data type for the logical replication message formats.