Re: Allow the "operand" input of width_bucket() to be NaN - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Allow the "operand" input of width_bucket() to be NaN
Date
Msg-id CAEZATCWqd=QeLDovvHQ7+Rpe5yMgsusQhXptg+tOikJD3opU9Q@mail.gmail.com
Whole thread Raw
In response to Allow the "operand" input of width_bucket() to be NaN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, 21 Jun 2025 at 22:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> The attached patch does what was discussed in the pgsql-docs
> thread at [1], namely change the four-argument variants of
> width_bucket() to allow their first argument to be NaN,
> treating that value as larger than any non-NaN.
>

LGTM.

I note that there is no doc update, and I think that is correct, since
we never previously documented that NaN wasn't allowed. The new
behaviour is what one would have expected, given that we do document
that NaN values compare as greater than all non-NaN values.

It could even be argued that this is a bug fix, but the lack of prior
complaints justifies not back-patching.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Periodic FSM vacuum doesn't happen in one-pass strategy vacuum.
Next
From: shveta malik
Date:
Subject: Re: Using failover slots for PG-non_PG logical replication