Re: BUG #17876: Function width_bucket() for float8 input returns value out of range

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mats Kindahl <mats(at)timescale(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17876: Function width_bucket() for float8 input returns value out of range
Date: 2023-04-05 21:41:06
Message-ID: 2173637.1680730866@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mats Kindahl <mats(at)timescale(dot)com> writes:
> On Fri, Mar 31, 2023 at 3:14 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> While I'm not bothered too much if rounding affects which internal
>> bucket a value lands in, it's a bit more annoying if that causes
>> it to be reported as being in the end bucket, when we know positively
>> that the value is less than bound2. Is it worth expending more
>> cycles to prevent this?

> I think it could be. I agree that it does not make sense to select the end
> bucket when the value is in range, even if just.

Yeah. I did that already at a2a0c7c29, sorry for not circling back
to this thread.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Edi Keškić 2023-04-05 21:44:57 Error while installing Postgresql
Previous Message Joe Conway 2023-04-05 20:38:55 Re: Wrong results with postgres_fdw and merge anti join from RHEL 7.9 to RHEL 8.7