Re: Improve readability by using designated initializers when possible
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Japin Li <japinli@hotmail.com>
Cc: Michael Paquier <michael@paquier.xyz>,
jian he <jian.universality@gmail.com>, Jeff Davis <pgsql@j-davis.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-hackers@lists.postgresql.org
Date: 2024-02-27T16:06:47Z
Lists: pgsql-hackers
Attachments
- v5-0002-Use-designated-initializer-syntax-to-improve-read.patch (text/x-patch) patch v5-0002
- v5-0003-Simplify-pg_enc2gettext_tbl.patch (text/x-patch) patch v5-0003
- v5-0004-Remove-unnecessary-NULL-termination-in-config_gro.patch (text/x-patch) patch v5-0004
On Tue, 27 Feb 2024 at 16:04, Japin Li <japinli@hotmail.com> wrote: > I see the config_group_names[] needs null-terminated because of help_config, > however, I didn't find the reference in help_config.c. Is this comment > outdated? Yeah, you're correct. That comment has been outdated for more than 20 years. The commit that made it unnecessary to null-terminate the array was 9d77708d83ee. Attached is v5 of the patchset that also includes this change (with you listed as author).
Commits
-
Remove ObjectClass type
- 89e5ef7e2181 17.0 landed
-
Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax
- 655dc310460c 17.0 landed
-
Use C99-designated initializer syntax for arrays related to encodings
- ada87a4d95fc 17.0 landed
-
Remove last NULL element in config_group_names[]
- 48920476b490 17.0 landed
-
Use C99-designated initializer syntax for more arrays
- afd8ef39094b 17.0 landed
-
Remove unnecessary array object_classes[] in dependency.c
- ef5e2e90859a 17.0 landed
-
Add trailing commas to enum definitions
- 611806cd726f 17.0 cited