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-03-29 12:33:37
Message-ID: 3807420.1680093217@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:
> Attached is a proposed fix for the issue.

Hm. Aren't you replacing a risk of overflow with a risk of underflow?
I'd be happier about doing this only if isinf(bound2 - bound1), or
the reverse for the other path. (Seems like we shouldn't need to
check the operand diff separately.)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-03-29 14:00:01 BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access
Previous Message Tom Lane 2023-03-29 11:47:12 Re: BUG #17874: Incorrect memory access at gistBuildCallback