Add explicit initialization for all PlannerGlobal fields - Mailing list pgsql-hackers

From Richard Guo
Subject Add explicit initialization for all PlannerGlobal fields
Date
Msg-id CAMbWs4-TgQHNOiouqGcuHoBqbJjWyx4UxGKxUY3FrF4trGbcPA@mail.gmail.com
Whole thread Raw
Responses Re: Add explicit initialization for all PlannerGlobal fields
List pgsql-hackers
While adding a new field to PlannerGlobal in another patch, I noticed
that although most fields are explicitly initialized, a few are not.
This doesn't cause any functional issues, since makeNode() zeroes all
fields by default.  However, the inconsistency stood out to me, so I
wrote the attached patch to explicitly initialize the remaining fields
for clarity and consistency.

Does this seem worthwhile?  Or should we simply rely on makeNode() for
zero-initialization and consider this unnecessary?

Thanks
Richard

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: make VALIDATE domain constraint lock on related relations as ShareUpdateExclusiveLock
Next
From: Alena Rybakina
Date:
Subject: Re: Vacuum statistics