| From: | Richard Guo <rguo(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add explicit initialization for all PlannerGlobal fields |
| Date: | 2025-05-14 01:00:10 |
| Message-ID: | E1uF0Th-001Ynq-2l@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add explicit initialization for all PlannerGlobal fields
When creating a new PlannerGlobal node in standard_planner(), most
fields are explicitly initialized, but a few are not. This doesn't
cause any functional issues, as makeNode() zeroes all fields by
default. However, the inconsistency is undesirable from a clarity and
maintenance perspective.
This patch explicitly initializes the remaining fields to improve
consistency and readability.
Author: Richard Guo <guofenglinux(at)gmail(dot)com>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAMbWs4-TgQHNOiouqGcuHoBqbJjWyx4UxGKxUY3FrF4trGbcPA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2c0ed86d393670c7054d051490063de771f1791e
Modified Files
--------------
src/backend/optimizer/plan/planner.c | 5 +++++
1 file changed, 5 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | sean | 2025-05-14 08:38:06 | Re:pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio |
| Previous Message | Daniel Gustafsson | 2025-05-13 11:33:10 | pgsql: Fix order of parameters in POD documentation |