Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Дата
Msg-id CAA4eK1Lszqs6h=TdnUvYRycS=z4ZMSSbtf5w81xBevGuk1BdmA@mail.gmail.com
обсуждение исходный текст
Ответ на Proposal: Make use of C99 designated initialisers for nulls/valuesarrays  ("Smith, Peter" <peters@fast.au.fujitsu.com>)
Ответы Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
RE: Proposal: Make use of C99 designated initialisers fornulls/values arrays  ("Smith, Peter" <peters@fast.au.fujitsu.com>)
Список pgsql-hackers
On Tue, Oct 1, 2019 at 1:25 PM Smith, Peter <peters@fast.au.fujitsu.com> wrote:
>
> Dear Hackers,
>
> I have identified some OSS code which maybe can make use of C99 designated initialisers for nulls/values arrays.
>
> ~
>
> Background:
> There are lots of tuple operations where arrays of values and flags are being passed.
> Typically these arrays are being previously initialised 0/false by memset.
> By modifying code to use C99 designated initialiser syntax [1], most of these memsets can become redundant.
> Actually, this mechanism is already being used in some of the existing OSS code. This patch/proposal just propagates
thesame idea to all other similar places I could find.
 
>
> ~
>
> Result:
> Less code. Removes ~200 unnecessary memsets.
> More consistent initialisation.
>

+1.  This seems like an improvement.  I can review and take this
forward unless there are objections from others.


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Optimize partial TOAST decompression
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Change atoi to strtol in same place