mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 03:21:24 +03:00
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@gmail.com> Reviewed-by: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/CAMbWs4-TgQHNOiouqGcuHoBqbJjWyx4UxGKxUY3FrF4trGbcPA@mail.gmail.com
This commit is contained in:
parent
6e289f2d5d
commit
2c0ed86d39
@ -326,10 +326,14 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions,
|
|||||||
glob->subroots = NIL;
|
glob->subroots = NIL;
|
||||||
glob->rewindPlanIDs = NULL;
|
glob->rewindPlanIDs = NULL;
|
||||||
glob->finalrtable = NIL;
|
glob->finalrtable = NIL;
|
||||||
|
glob->allRelids = NULL;
|
||||||
|
glob->prunableRelids = NULL;
|
||||||
glob->finalrteperminfos = NIL;
|
glob->finalrteperminfos = NIL;
|
||||||
glob->finalrowmarks = NIL;
|
glob->finalrowmarks = NIL;
|
||||||
glob->resultRelations = NIL;
|
glob->resultRelations = NIL;
|
||||||
|
glob->firstResultRels = NIL;
|
||||||
glob->appendRelations = NIL;
|
glob->appendRelations = NIL;
|
||||||
|
glob->partPruneInfos = NIL;
|
||||||
glob->relationOids = NIL;
|
glob->relationOids = NIL;
|
||||||
glob->invalItems = NIL;
|
glob->invalItems = NIL;
|
||||||
glob->paramExecTypes = NIL;
|
glob->paramExecTypes = NIL;
|
||||||
@ -338,6 +342,7 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions,
|
|||||||
glob->lastPlanNodeId = 0;
|
glob->lastPlanNodeId = 0;
|
||||||
glob->transientPlan = false;
|
glob->transientPlan = false;
|
||||||
glob->dependsOnRole = false;
|
glob->dependsOnRole = false;
|
||||||
|
glob->partition_directory = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assess whether it's feasible to use parallel mode for this query. We
|
* Assess whether it's feasible to use parallel mode for this query. We
|
||||||
|
Loading…
x
Reference in New Issue
Block a user