agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Robert Treat <rob@xzilla.net>
Cc: Ben Peachey Higdon <bpeacheyhigdon@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Document if width_bucket's low and high are inclusive/exclusive
Date: Sat, 21 Jun 2025 13:09:48 -0400
Message-ID: <2732038.1750525788@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCUnTYEi5QEFtRkaNvMYHfanKbwJir1E9Q8qYzaLt_0ktQ@mail.gmail.com>
References: <2BD74F86-5B89-4AC1-8F13-23CED3546AC1@gmail.com>
	<CABV9wwPh9+JAYBudAhTY8yPj5VJACA_FpHfEAaHMX1s4z05VkQ@mail.gmail.com>
	<1167135.1750277532@sss.pgh.pa.us>
	<CAJSLCQ2aNwXntHfFZdLnrAqrhPUbm7YqytobFOid5mX3VU-C5g@mail.gmail.com>
	<1391433.1750345913@sss.pgh.pa.us>
	<2525554.1750454361@sss.pgh.pa.us>
	<CAEZATCUnTYEi5QEFtRkaNvMYHfanKbwJir1E9Q8qYzaLt_0ktQ@mail.gmail.com>

Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On Fri, 20 Jun 2025 at 22:19, Tom Lane <tgl@sss.pgh.pa.us> 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, also done.

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
goes out of its way to accept it and treat it in our usual
fashion as sorting higher than all non-NaNs.

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 imagine this'd be a HEAD-only
change, and probably v19 material at this point.)

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <2732038.1750525788@sss.pgh.pa.us>
Permalink:  ../2732038.1750525788@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2732038.1750525788@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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, rob@xzilla.net, bpeacheyhigdon@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Document if width_bucket's low and high are inclusive/exclusive
  In-Reply-To: <2732038.1750525788@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox