Mats Kindahl <mats@timescale.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