pgsql: Mostly-cosmetic adjustments to estimate_multivariate_bucketsize(

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Mostly-cosmetic adjustments to estimate_multivariate_bucketsize(
Date: 2025-07-19 18:23:08
Message-ID: E1udCDE-0077ou-1i@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Mostly-cosmetic adjustments to estimate_multivariate_bucketsize().

The only practical effect of these changes is to avoid a useless
list_copy() operation when there is a single hashclause. That's
never going to make any noticeable performance difference, but
the code is arguably clearer this way, especially if we take the
opportunity to add some comments so that readers don't have to
reverse-engineer the usage of these local variables. Also add
some braces for better/more consistent style.

Author: Tender Wang <tndrwang(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/CAHewXNnHBOO9NEa=NBDYOrwZL4oHu2NOcTYvqyNyWEswo8f5OQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/aadf7db66ef5a8a723eb3362e2c8b460738f1107

Modified Files
--------------
src/backend/utils/adt/selfuncs.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2025-07-19 22:34:54 pgsql: Fix infinite wait when reading a partially written WAL record
Previous Message Alexander Korotkov 2025-07-19 12:46:11 pgsql: Fix infinite wait when reading a partially written WAL record