Re: Improve readability by using designated initializers when possible

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Japin Li <japinli@hotmail.com>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>, 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-28T03:59:24Z
Lists: pgsql-hackers

Attachments

On Wed, Feb 28, 2024 at 09:41:42AM +0800, Japin Li wrote:
> On Wed, 28 Feb 2024 at 00:06, Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
>> Attached is v5 of the patchset that also includes this change (with
>> you listed as author).
> 
> Thanks for updating the patch!

Cool.  I have applied 0004 and most of 0002.  Attached is what
remains, where I am wondering if it would be cleaner to do these bits
together (did not look at the whole, yet).

> It looks good to me except there is an outdated comment.

Yep, I've updated that in the attached for now.
--
Michael

Commits

  1. Remove ObjectClass type

  2. Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax

  3. Use C99-designated initializer syntax for arrays related to encodings

  4. Remove last NULL element in config_group_names[]

  5. Use C99-designated initializer syntax for more arrays

  6. Remove unnecessary array object_classes[] in dependency.c

  7. Add trailing commas to enum definitions