pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mats Kindahl <mats@timescale.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17876: Function width_bucket() for float8 input returns value out of range
Date: Wed, 29 Mar 2023 08:33:37 -0400
Message-ID: <3807420.1680093217@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+14427KvPsskajKSriGACyrudcOyh5ohmt=0WPuNjoMTSQM6A@mail.gmail.com>
References: <17876-61f280d1601f978d@postgresql.org>
	<CA+14427KvPsskajKSriGACyrudcOyh5ohmt=0WPuNjoMTSQM6A@mail.gmail.com>

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





view thread (9+ messages)  latest in thread

Message-ID: <3807420.1680093217@sss.pgh.pa.us>
Permalink:  ../3807420.1680093217@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3807420.1680093217@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mats@timescale.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17876: Function width_bucket() for float8 input returns value out of range
  In-Reply-To: <3807420.1680093217@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox