From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add explicit initialization for all PlannerGlobal fields |
Date: | 2025-05-14 01:05:51 |
Message-ID: | CAMbWs4-Jp9rjH2KZBBUDcydPXHE19dxL9=KaWUjwABuhzEuVOw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 13, 2025 at 8:26 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Tue, 13 May 2025 at 04:03, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > 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?
>
> These should be zeroed explicitly.
Thank you for confirming. I've pushed this patch to master.
Thanks
Richard
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2025-05-14 02:13:56 | Re: Memoize ANTI and SEMI JOIN inner |
Previous Message | Hari Krishna Sunder | 2025-05-14 00:01:02 | Re: Statistics Import and Export |