Re: Document if width_bucket's low and high are inclusive/exclusive

2025-06-21 Thread Dean Rasheed
On Sat, 21 Jun 2025 at 18:09, Tom Lane wrote: > > While looking at those comments, I also noted that there is a > strange inconsistency between width_bucket_array and > width_bucket_float8/width_bucket_numeric. Namely, the latter > two reject an "operand" that is NaN, while width_bucket_array > g

Re: Document if width_bucket's low and high are inclusive/exclusive

2025-06-21 Thread Tom Lane
Dean Rasheed writes: > On Sat, 21 Jun 2025 at 18:09, Tom Lane wrote: >> Clearly these functions must reject NaN histogram bounds, for >> the same reason they reject infinite bounds. But I don't see >> any reason why they couldn't treat a NaN operand as valid. >> Should we change them? (I imagin

Re: Document if width_bucket's low and high are inclusive/exclusive

2025-06-21 Thread Tom Lane
Dean Rasheed writes: > On Fri, 20 Jun 2025 at 22:19, Tom Lane wrote: >> So concretely, how about the attached? > LGTM (though I'm not sure it really needs the word "therefore" in the > first hunk). OK, done that way. > There are also a couple of code comments that need fixing -- Good points,

Re: Document if width_bucket's low and high are inclusive/exclusive

2025-06-21 Thread Dean Rasheed
On Fri, 20 Jun 2025 at 22:19, Tom Lane wrote: > > So concretely, how about the attached? > LGTM (though I'm not sure it really needs the word "therefore" in the first hunk). There are also a couple of code comments that need fixing -- width_bucket_float8() comes with the following comment: * '