Re: GUC tables - use designated initializers

2022-10-04 Thread Peter Smith
On Tue, Oct 4, 2022 at 5:48 PM Michael Paquier wrote: > > On Tue, Oct 04, 2022 at 04:20:36PM +1100, Peter Smith wrote: > > The v2 patches are updated as follows: > > > > 0001 - Now this patch only fixes a comment that had a wrong enum name. > > This was wrong, so fixed. Thanks for pushing! > > >

Re: GUC tables - use designated initializers

2022-10-03 Thread Michael Paquier
On Tue, Oct 04, 2022 at 04:20:36PM +1100, Peter Smith wrote: > The v2 patches are updated as follows: > > 0001 - Now this patch only fixes a comment that had a wrong enum name. This was wrong, so fixed. > 0002 - Removes unnecessary whitespace (same as v1-0002) This one does not seem worth doing

Re: GUC tables - use designated initializers

2022-10-03 Thread Peter Smith
On Wed, Sep 28, 2022 at 12:04 PM Peter Smith wrote: > > On Wed, Sep 28, 2022 at 2:21 AM Tom Lane wrote: > > > > Peter Smith writes: > > > 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

Re: GUC tables - use designated initializers

2022-09-27 Thread Peter Smith
On Wed, Sep 28, 2022 at 2:21 AM Tom Lane wrote: > > Peter Smith writes: > > 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.

Re: GUC tables - use designated initializers

2022-09-27 Thread Tom Lane
Peter Smith writes: > 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 th

Re: GUC tables - use designated initializers

2022-09-26 Thread Michael Paquier
On Tue, Sep 27, 2022 at 09:27:48AM +1000, Peter Smith wrote: > But why not use designated initializers to enforce what the comments > are hoping for? This is a C99 thing as far as I understand, adding one safety net. Why not for these cases.. > Doing this also exposed a minor typo in the comments