GUC tables - use designated initializers - Mailing list pgsql-hackers

From Peter Smith
Subject GUC tables - use designated initializers
Date
Msg-id CAHut+PtDj3CV+f0pVisc0XYMi2LHGBpQxQWtF0FjiSVN_nV17Q@mail.gmail.com
Whole thread Raw
Responses Re: GUC tables - use designated initializers
Re: GUC tables - use designated initializers
List pgsql-hackers
Hi hackers,

Enums index a number of the GUC tables. This all relies on the
elements being carefully arranged to be in the same order as those
enums. There are comments to say what enum index belongs to each table
element.

But why not use designated initializers to enforce what the comments
are hoping for?

~~

PSA a patch for the same.

Doing this also exposed a minor typo in the comments.
"ERROR_HANDLING" -> "ERROR_HANDLING_OPTIONS"

Furthermore, with this change, now the GUC table elements are able to
be rearranged into any different order - eg alphabetical - if that
would be useful (my patch does not do this).

~~

In passing, I also made a 0002 patch to remove some inconsistent
whitespace noticed in those config tables.

Thoughts?

------
Kind Regards,
Peter Smith.
Fujitsu Australia.

Attachment

pgsql-hackers by date:

Previous
From: Ibrar Ahmed
Date:
Subject: [Commitfest 2022-09] Last days
Next
From: Peter Smith
Date:
Subject: GUC values - recommended way to declare the C variables?