Re: Code cleanup patch submission for extended_stats.c
Mark Dilger <hornschnorter@gmail.com>
From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2017-11-26T02:07:14Z
Lists: pgsql-hackers
Attachments
- 0001_extended_stats_sizeof.patch.2 (application/octet-stream)
- (unnamed) (text/plain)
> On Nov 25, 2017, at 2:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Mark Dilger <hornschnorter@gmail.com> writes: >> It looks to me like Alvaro introduced this in the original version of the file which >> was created in commit 7b504eb282ca2f5104b5c00b4f05a3ef6bb1385b. Grep'ing >> through the code base, it seems the following would be more consistent with >> how these initializations are handled elsewhere: > >> memset(nulls, 1, sizeof(nulls)); >> memset(replaces, 0, sizeof(replaces)); >> memset(values, 0, sizeof(values)); > > +1. I'd be inclined to use "false" and "true" for the init values of > the boolean arrays, too. Done. mark
Commits
-
Make memset() use sizeof() rather than re-compute size
- 3848d21673e9 11.0 landed
- cce3d72a8a42 10.2 landed
-
Implement multivariate n-distinct coefficients
- 7b504eb282ca 10.0 cited