Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c0ed86

Browse files
author
Richard Guo
committed
Add explicit initialization for all PlannerGlobal fields
When creating a new PlannerGlobal node in standard_planner(), mostfields are explicitly initialized, but a few are not. This doesn'tcause any functional issues, as makeNode() zeroes all fields bydefault. However, the inconsistency is undesirable from a clarity andmaintenance perspective.This patch explicitly initializes the remaining fields to improveconsistency 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
1 parent6e289f2 commit2c0ed86

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/backend/optimizer/plan/planner.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,14 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions,
326326
glob->subroots=NIL;
327327
glob->rewindPlanIDs=NULL;
328328
glob->finalrtable=NIL;
329+
glob->allRelids=NULL;
330+
glob->prunableRelids=NULL;
329331
glob->finalrteperminfos=NIL;
330332
glob->finalrowmarks=NIL;
331333
glob->resultRelations=NIL;
334+
glob->firstResultRels=NIL;
332335
glob->appendRelations=NIL;
336+
glob->partPruneInfos=NIL;
333337
glob->relationOids=NIL;
334338
glob->invalItems=NIL;
335339
glob->paramExecTypes=NIL;
@@ -338,6 +342,7 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions,
338342
glob->lastPlanNodeId=0;
339343
glob->transientPlan= false;
340344
glob->dependsOnRole= false;
345+
glob->partition_directory=NULL;
341346

342347
/*
343348
* Assess whether it's feasible to use parallel mode for this query. We

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp