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

From Jeff Davis
Subject Re: Improve readability by using designated initializers when possible
Date
Msg-id e59c369d9fffe7ad323a6f37f1a39b079855e42c.camel@j-davis.com
Whole thread Raw
In response to Improve readability by using designated initializers when possible  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: Improve readability by using designated initializers when possible
List pgsql-hackers
On Wed, 2024-02-21 at 16:03 +0100, Jelte Fennema-Nio wrote:
> Usage of designated initializers came up in:
> https://www.postgresql.org/message-id/flat/ZdWXhAt9Tz4d-lut%40paquier.xyz#9dc17e604e58569ad35643672bf74acc
>
> This converts all arrays that I could find that could clearly benefit
> from this without any other code changes being necessary.

Looking at the object_classes array and the ObjectClass enum, I don't
quite understand the point. It seems like a way to write OCLASS_OPCLASS
instead of OperatorClassRelationId, and similar?

Am I missing something?

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Add lookup table for replication slot invalidation causes
Next
From: Andres Freund
Date:
Subject: Re: Avoid stack frame setup in performance critical routines using tail calls