Mostly-cosmetic adjustments to estimate_multivariate_bucketsize().
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Jul 2025 18:23:02 +0000 (14:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Jul 2025 18:23:02 +0000 (14:23 -0400)
commitaadf7db66ef5a8a723eb3362e2c8b460738f1107
tree2dbe4fde64153dee7f8ed86f4973c9a647325921
parentcdf1f5a607330eaf21a8fc669cb65cd9135472ba
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@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: http://postgr.es/m/CAHewXNnHBOO9NEa=NBDYOrwZL4oHu2NOcTYvqyNyWEswo8f5OQ@mail.gmail.com
src/backend/utils/adt/selfuncs.c