Re: Improve readability by using designated initializers when possible - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Improve readability by using designated initializers when possible
Date
Msg-id CAGECzQTgMJQzS-OZzzbWyto-Nyzw8qS-9AvhZNgPvnOiX7VCsw@mail.gmail.com
Whole thread Raw
In response to Re: Improve readability by using designated initializers when possible  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Improve readability by using designated initializers when possible
List pgsql-hackers
On Fri, 23 Feb 2024 at 02:57, Jeff Davis <pgsql@j-davis.com> wrote:
> Sorry, I was unclear. I was asking a question about the reason the
> ObjectClass and the object_classes[] array exist in the current code,
> it wasn't a direct question about your patch.

I did a bit of git spelunking and the reason seems to be that back in
2002 when this was introduced not all relation ids were compile time
constants and thus an array was initialized once at bootup. I totally
agree with you that these days there's no reason for the array. So I
now added a second patch that removes this array, instead of updating
it to use the designated initializer syntax.

Attachment

pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Synchronizing slots from primary to standby
Next
From: Bertrand Drouvot
Date:
Subject: Re: Synchronizing slots from primary to standby