On Sun, Mar 17, 2019 at 3:00 PM Peter Eisentraut <[email protected]> wrote: > On 2019-03-17 10:59, Alexander Korotkov wrote: > > Beautify initialization of JsonValueList and JsonLikeRegexContext > > > > Instead of tricky assignment to {0} introduce special macros, which > > explicitly initialize every field. > > To me, this patch is exactly the opposite of what I'd do to "beautify > initialization". It doesn't seem sustainable to me to create a special > macro for every structure in the code, not does it improve readability. > It is much clearer that {0} is uniformly the starting state.
I got two reasons in the mind while committing that: 1) We would probably like to make some values of empty state non-zero in future. 2) In general, it's better to not assume that NULL is binary zero. However, we assume that a lot in other places. So, it probably doesn't matter. Anyway, I thought about this as about just beautification. If it's bad idea, let's revert this. ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
