Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uRz8t-001jQl-Hy for pgsql-docs@arkaria.postgresql.org; Wed, 18 Jun 2025 20:12:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uRz8r-004XVz-Fw for pgsql-docs@arkaria.postgresql.org; Wed, 18 Jun 2025 20:12:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uRz8r-004XVr-86 for pgsql-docs@lists.postgresql.org; Wed, 18 Jun 2025 20:12:17 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uRz8p-002osq-0S for pgsql-docs@lists.postgresql.org; Wed, 18 Jun 2025 20:12:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 55IKCCGR1167136; Wed, 18 Jun 2025 16:12:12 -0400 From: Tom Lane To: Robert Treat cc: Ben Peachey Higdon , pgsql-docs@lists.postgresql.org Subject: Re: Document if width_bucket's low and high are inclusive/exclusive In-reply-to: References: <2BD74F86-5B89-4AC1-8F13-23CED3546AC1@gmail.com> Comments: In-reply-to Robert Treat message dated "Wed, 18 Jun 2025 14:56:48 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1167134.1750277532.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Jun 2025 16:12:12 -0400 Message-ID: <1167135.1750277532@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Treat writes: > On Fri, Feb 28, 2025 at 7:15=E2=80=AFAM Ben Peachey Higdon > wrote: >> The current documentation for width_bucket (https://www.postgresql.org/= docs/current/functions-math.html) does not mention if the range=E2=80=99s = low and high are inclusive or 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. Seems reasonable, but do we need to do anything with the other version of width_bucket (the one taking an array of lower bounds)? Perhaps this change provides enough context, but I'm unsure. regards, tom lane