Re: Improve readability by using designated initializers when possible

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Improve readability by using designated initializers when possible
Date: 2024-02-22 22:46:51
Message-ID: e59c369d9fffe7ad323a6f37f1a39b079855e42c.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-02-22 22:53:43 Re: Avoid stack frame setup in performance critical routines using tail calls
Previous Message Peter Smith 2024-02-22 22:04:04 Re: Add lookup table for replication slot invalidation causes