Re: Remove redundant initializations
| От | David Rowley |
|---|---|
| Тема | Re: Remove redundant initializations |
| Дата | |
| Msg-id | CAApHDvqW49yb6Lhto=DbHr0Ph2fgDcz5ae+TJPY=Nzqbj3+E=A@mail.gmail.com обсуждение исходный текст |
| Ответ на | Remove redundant initializations (Peter Eisentraut <peter.eisentraut@enterprisedb.com>) |
| Список | pgsql-hackers |
On Mon, 28 Jun 2021 at 21:59, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote: > > There are certain parts of code that laboriously initialize every field > of a struct to (some spelling of) zero, even though the whole struct was > just zeroed (by makeNode() or memset()) a few lines earlier. Besides > being redundant, I find this hard to read in some situations because > it's then very hard to tell what is different between different cases or > branches. Just for information, there was a similar proposal in [1]. There were some arguments for and against the idea. Might be worth reviewing. David [1] https://www.postgresql.org/message-id/flat/CAFjFpRdmx2oWdCrYcQuk9CZ7S9iTrKSziC%3D%3D6j0Agw4jdmvLng%40mail.gmail.com#ff36253217d67d5531f5b2017a0dbfd0
В списке pgsql-hackers по дате отправления: