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

Поиск
Список
Период
Сортировка
От Smith, Peter
Тема RE: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Дата
Msg-id 201DD0641B056142AC8C6645EC1B5F62014B927BAF@SYD1217
обсуждение исходный текст
Ответ на Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
From: Amit Kapila <amit.kapila16@gmail.com> Sent: Friday, 4 October 2019 4:50 PM

>>How about I just define them both the same?
>>#define INIT_ALL_ELEMS_ZERO     {0}
>>#define INIT_ALL_ELEMS_FALSE    {0}
>
>I think using one define would be preferred, but you can wait and see if others prefer defining different macros for
thesame thing.
 

While nowhere near unanimous, it seems majority favour using a macro (if only to protect the unwary and document the
behaviour).
And of those in favour of macros, using INIT_ALL_ELEMS_ZERO even for bool array is a clear preference.

So, please find attached the updated patch, which now has just 1 macro.

Kind Regards
--
Peter Smith
Fujitsu Australia

Вложения

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

Предыдущее
От: Isaac Morland
Дата:
Сообщение: Re: PATCH: Add uri percent-encoding for binary data
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Two pg_rewind patches (auto generate recovery conf and ensureclean shutdown)