From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Joe Nelson <joe(at)begriffs(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays |
Date: | 2019-11-12 19:31:32 |
Message-ID: | 20191112193132.qwxtipgnpkulwwrq@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2019-11-12 14:17:42 +0900, Michael Paquier wrote:
> 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/.
-many. I think this serves zero positive purpose, except to make it
harder to analyze code-flow.
I think it's not worth going around to convert code to use {0} style
initializers in most cases, but when authors write it, we shouldn't
remove it either.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2019-11-12 19:47:20 | Re: Missing dependency tracking for TableFunc nodes |
Previous Message | Andres Freund | 2019-11-12 19:27:16 | Re: Coding in WalSndWaitForWal |