Re: Use C99 designated initializers for some structs

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: David Steele <david@pgmasters.net>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-29T20:56:43Z
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


Commits

  1. Use C99 designated initializers for some structs