Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
| От | Andres Freund |
|---|---|
| Тема | Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays |
| Дата | |
| Msg-id | 20191112193132.qwxtipgnpkulwwrq@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays (Michael Paquier <michael@paquier.xyz>) |
| Ответы |
RE: Proposal: Make use of C99 designated initialisers fornulls/values arrays
|
| Список | 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
В списке pgsql-hackers по дате отправления: