Doc: improve documentation about width_bucket().
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Jun 2025 16:52:37 +0000 (12:52 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Jun 2025 16:52:37 +0000 (12:52 -0400)
commitccfe3dbaa4392ec1cf50224c57eccd0f34ce8d1d
tree38542b87dca655a4864a2538a4b72579b282a812
parent75b8982eae78f930cc8c1c48cd2d9dc03113d92b
Doc: improve documentation about width_bucket().

Specify whether the bucket bounds are inclusive or exclusive,
and improve some other vague language.  Explain the behavior that
occurs when the "low" bound is greater than the "high" bound.
Make width_bucket_numeric's comment more like that for
width_bucket_float8, in particular noting that infinite
bounds are rejected (since they became possible in v14).

Reported-by: Ben Peachey Higdon <bpeacheyhigdon@gmail.com>
Author: Robert Treat <rob@xzilla.net>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: http://postgr.es/m/2BD74F86-5B89-4AC1-8F13-23CED3546AC1@gmail.com
Backpatch-through: 13
doc/src/sgml/func.sgml
src/backend/utils/adt/float.c
src/backend/utils/adt/numeric.c