Re: Use C99 designated initializers for some structs

From: Andres Freund <andres(at)anarazel(dot)de>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use C99 designated initializers for some structs
Date: 2018-08-29 20:56:43
Message-ID: 20180829205643.d2dgrcdzsoa3wbds@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-08-29 15:51:07 -0500, David Steele wrote:
> One thing: I'm not sure that excluding the InvalidOid assignment in the
> TopTransactionStateData initializer is a good idea. That is, it's not clear
> that InvalidOid is 0.
>
> NULL, false, and 0 seem like no-brainers, but maybe it would be better to
> explicitly include constants that we define that are not obviously 0, or
> maybe just all of them.

We rely on that in many other places imo. So I don't think it's worth
starting to care about it here.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-08-29 21:41:42 Re: Use C99 designated initializers for some structs
Previous Message Michael Paquier 2018-08-29 20:54:36 Re: BUG #15346: Replica fails to start after the crash