Re: Document if width_bucket's low and high are inclusive/exclusive - Mailing list pgsql-docs

From Robert Treat
Subject Re: Document if width_bucket's low and high are inclusive/exclusive
Date
Msg-id CABV9wwPh9+JAYBudAhTY8yPj5VJACA_FpHfEAaHMX1s4z05VkQ@mail.gmail.com
Whole thread Raw
In response to Document if width_bucket's low and high are inclusive/exclusive  (Ben Peachey Higdon <bpeacheyhigdon@gmail.com>)
List pgsql-docs
On Fri, Feb 28, 2025 at 7:15 AM Ben Peachey Higdon
<bpeacheyhigdon@gmail.com> wrote:
> The current documentation for width_bucket (https://www.postgresql.org/docs/current/functions-math.html) does not
mentionif the range’s low and high are inclusive or exclusive. 
>
> Returns the number of the bucket in which operand falls in a histogram having count equal-width buckets spanning the
rangelow to high. Returns 0 or count+1 for an input outside that range. 
>
> I had assumed that both the low and high were inclusive but actually the low is inclusive while the high is
exclusive.
>

I'm not sure it's the most ground breaking thing, but would probably
save a bunch of future people from having to gin up an example to test
it, so I'd probably update it per the following patch.


Robert Treat
https://xzilla.net

Attachment

pgsql-docs by date:

Previous
From: Robert Treat
Date:
Subject: Re: Clarify VACUUM FULL exclusion in total_vacuum_time docs
Next
From: Fujii Masao
Date:
Subject: Re: Mention GIN indexes support parallel builds.