Add explicit initialization for all PlannerGlobal fields
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-05-13T08:02:54Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-explicit-initialization-for-all-PlannerGlobal.patch (application/octet-stream) patch v1-0001
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
Commits
-
Add explicit initialization for all PlannerGlobal fields
- 2c0ed86d3936 18.0 landed