"Smith, Peter" <pet...@fast.au.fujitsu.com> writes: > From: Amit Kapila <amit.kapil...@gmail.com> Sent: Friday, 4 October 2019 1:32 > PM >> Also, if we want to pursue, do we want to use INIT_ALL_ZEROES for bool >> arrays as well?
> FYI - In case it went unnoticed - my last patch addresses this by defining 2 > macros: > #define INIT_ALL_ELEMS_ZERO {0} > #define INIT_ALL_ELEMS_FALSE {false} I would say that's 100% wrong. The entire point here is that it's memset-equivalent, and therefore writes zeroes, regardless of what the datatype is. As a counterexample, the coding you have above looks a lot like it would work to add #define INIT_ALL_ELEMS_TRUE {true} which as previously noted will *not* work. So I think the one-size-fits-all approach is what to use. regards, tom lane