Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alexander Korotkov <akorotkov(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex
Date: 2019-03-17 11:59:49
Message-ID: ecfcfb5f-3233-eaa9-0c83-07056fb49a83@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2019-03-17 12:09:07 Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex
Previous Message Alexander Korotkov 2019-03-17 09:59:52 pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex