Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Date
Msg-id 20191112051742.GL1549@paquier.xyz
Whole thread Raw
In response to Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, Oct 22, 2019 at 04:13:03PM +0530, Amit Kapila wrote:
> Hmm, but then what is your suggestion for existing code that uses {0}.
> If we reject this patch and leave the current code as it is, there is
> always a risk of some people using {0} and others using memset which
> will lead to further deviation in the code.  Now, maybe if we change
> the existing code to always use memset where we use {0}, then we can
> kind of enforce such a rule for future patch authors.

Well, we could have a shot at reducing the footprint of {0} then where
we can.  I am seeing less than a dozen in contrib/, and a bit more
than thirty in src/backend/.  Or we could just do as we do with such
business: let's update them when we see that's adapted and when
modifying the surrounding area.

At least I see one conclusion coming out of this thread: the patch is
in the direction of getting rejected.  My recommendation would be to
do that, and focus on other patches which could get merged: we have a
total of 220 entries in this CF.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: cost based vacuum (parallel)
Next
From: Michael Paquier
Date:
Subject: Re: Proposal: Add more compile-time asserts to exposeinconsistencies.