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 CAGECzQQPhVCarZY595ZyJ7gKEU=016TxHvQLPH6fQtOUN6kHSA@mail.gmail.com
Whole thread Raw
In response to Re: Improve readability by using designated initializers when possible  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Improve readability by using designated initializers when possible
List pgsql-hackers
On Fri, 1 Mar 2024 at 05:12, Michael Paquier <michael@paquier.xyz> wrote:
> Shouldn't PG_MULE_INTERNAL point to NULL in pg_enc2gettext_tbl[]?
> That just seems safer to me, and more consistent because its values
> satisfies PG_VALID_ENCODING().

Safety wise it doesn't matter, because gaps in a designated
initializer array will be initialized with 0/NULL. But I agree it's
more consistent, so see attached.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Synchronizing slots from primary to standby
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables