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

Commit3140f08

Browse files
committed
Reformat some more node comments
Reformat some more comments in node field definitions to avoid longlines. Similar to835d476, based onadditional per-field annotations that will be required.Discussion:https://www.postgresql.org/message-id/c5906b07-220a-a3d4-8ff3-8ee593009424@enterprisedb.com
1 parent0ad5b48 commit3140f08

File tree

2 files changed

+189
-97
lines changed

2 files changed

+189
-97
lines changed

‎src/include/nodes/pathnodes.h

Lines changed: 171 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -91,45 +91,65 @@ typedef struct PlannerGlobal
9191
{
9292
NodeTagtype;
9393

94-
ParamListInfoboundParams;/* Param values provided to planner() */
94+
/* Param values provided to planner() */
95+
ParamListInfoboundParams;
9596

96-
List*subplans;/* Plans for SubPlan nodes */
97+
/* Plans for SubPlan nodes */
98+
List*subplans;
9799

98-
List*subroots;/* PlannerInfos for SubPlan nodes */
100+
/* PlannerInfos for SubPlan nodes */
101+
List*subroots;
99102

100-
Bitmapset*rewindPlanIDs;/* indices of subplans that require REWIND */
103+
/* indices of subplans that require REWIND */
104+
Bitmapset*rewindPlanIDs;
101105

102-
List*finalrtable;/* "flat" rangetable for executor */
106+
/* "flat" rangetable for executor */
107+
List*finalrtable;
103108

104-
List*finalrowmarks;/* "flat" list of PlanRowMarks */
109+
/* "flat" list of PlanRowMarks */
110+
List*finalrowmarks;
105111

106-
List*resultRelations;/* "flat" list of integer RT indexes */
112+
/* "flat" list of integer RT indexes */
113+
List*resultRelations;
107114

108-
List*appendRelations;/* "flat" list of AppendRelInfos */
115+
/* "flat" list of AppendRelInfos */
116+
List*appendRelations;
109117

110-
List*relationOids;/* OIDs of relations the plan depends on */
118+
/* OIDs of relations the plan depends on */
119+
List*relationOids;
111120

112-
List*invalItems;/* other dependencies, as PlanInvalItems */
121+
/* other dependencies, as PlanInvalItems */
122+
List*invalItems;
113123

114-
List*paramExecTypes;/* type OIDs for PARAM_EXEC Params */
124+
/* type OIDs for PARAM_EXEC Params */
125+
List*paramExecTypes;
115126

116-
IndexlastPHId;/* highest PlaceHolderVar ID assigned */
127+
/* highest PlaceHolderVar ID assigned */
128+
IndexlastPHId;
117129

118-
IndexlastRowMarkId;/* highest PlanRowMark ID assigned */
130+
/* highest PlanRowMark ID assigned */
131+
IndexlastRowMarkId;
119132

120-
intlastPlanNodeId;/* highest plan node ID assigned */
133+
/* highest plan node ID assigned */
134+
intlastPlanNodeId;
121135

122-
booltransientPlan;/* redo plan when TransactionXmin changes? */
136+
/* redo plan when TransactionXmin changes? */
137+
booltransientPlan;
123138

124-
booldependsOnRole;/* is plan specific to current role? */
139+
/* is plan specific to current role? */
140+
booldependsOnRole;
125141

126-
boolparallelModeOK;/* parallel mode potentially OK? */
142+
/* parallel mode potentially OK? */
143+
boolparallelModeOK;
127144

128-
boolparallelModeNeeded;/* parallel mode actually required? */
145+
/* parallel mode actually required? */
146+
boolparallelModeNeeded;
129147

130-
charmaxParallelHazard;/* worst PROPARALLEL hazard level */
148+
/* worst PROPARALLEL hazard level */
149+
charmaxParallelHazard;
131150

132-
PartitionDirectorypartition_directory;/* partition descriptors */
151+
/* partition descriptors */
152+
PartitionDirectorypartition_directory;
133153
}PlannerGlobal;
134154

135155
/* macro for fetching the Plan associated with a SubPlan node */
@@ -159,21 +179,26 @@ struct PlannerInfo
159179
{
160180
NodeTagtype;
161181

162-
Query*parse;/* the Query being planned */
182+
/* the Query being planned */
183+
Query*parse;
163184

164-
PlannerGlobal*glob;/* global info for current planner run */
185+
/* global info for current planner run */
186+
PlannerGlobal*glob;
165187

166-
Indexquery_level;/* 1 at the outermost Query */
188+
/* 1 at the outermost Query */
189+
Indexquery_level;
167190

168-
PlannerInfo*parent_root;/* NULL at outermost Query */
191+
/* NULL at outermost Query */
192+
PlannerInfo*parent_root;
169193

170194
/*
171195
* plan_params contains the expressions that this query level needs to
172196
* make available to a lower query level that is currently being planned.
173197
* outer_params contains the paramIds of PARAM_EXEC Params that outer
174198
* query levels will make available to this query level.
175199
*/
176-
List*plan_params;/* list of PlannerParamItems, see below */
200+
/* list of PlannerParamItems, see below */
201+
List*plan_params;
177202
Bitmapset*outer_params;
178203

179204
/*
@@ -183,15 +208,16 @@ struct PlannerInfo
183208
* does not correspond to a base relation, such as a join RTE or an
184209
* unreferenced view RTE; or if the RelOptInfo hasn't been made yet.
185210
*/
186-
structRelOptInfo**simple_rel_array;/* All 1-rel RelOptInfos */
187-
intsimple_rel_array_size;/* allocated size of array */
211+
structRelOptInfo**simple_rel_array;
212+
/* allocated size of array */
213+
intsimple_rel_array_size;
188214

189215
/*
190216
* simple_rte_array is the same length as simple_rel_array and holds
191217
* pointers to the associated rangetable entries. Using this is a shade
192218
* faster than using rt_fetch(), mostly due to fewer indirections.
193219
*/
194-
RangeTblEntry**simple_rte_array;/* rangetable as an array */
220+
RangeTblEntry**simple_rte_array;
195221

196222
/*
197223
* append_rel_array is the same length as the above arrays, and holds
@@ -236,35 +262,51 @@ struct PlannerInfo
236262
* automatically added to the join_rel_level[join_cur_level] list.
237263
* join_rel_level is NULL if not in use.
238264
*/
239-
List**join_rel_level;/* lists of join-relation RelOptInfos */
240-
intjoin_cur_level;/* index of list being extended */
265+
/* lists of join-relation RelOptInfos */
266+
List**join_rel_level;
267+
/* index of list being extended */
268+
intjoin_cur_level;
241269

242-
List*init_plans;/* init SubPlans for query */
270+
/* init SubPlans for query */
271+
List*init_plans;
243272

244-
List*cte_plan_ids;/* per-CTE-item list of subplan IDs (or -1 if
245-
* no subplan was made for that CTE) */
273+
/*
274+
* per-CTE-item list of subplan IDs (or -1 if no subplan was made for that
275+
* CTE)
276+
*/
277+
List*cte_plan_ids;
246278

247-
List*multiexpr_params;/* List of Lists of Params for MULTIEXPR
248-
* subquery outputs */
279+
/* List of Lists of Params for MULTIEXPR subquery outputs */
280+
List*multiexpr_params;
249281

250-
List*eq_classes;/* list of active EquivalenceClasses */
282+
/* list of active EquivalenceClasses */
283+
List*eq_classes;
251284

252-
boolec_merging_done;/* set true once ECs are canonical */
285+
/* set true once ECs are canonical */
286+
boolec_merging_done;
253287

254-
List*canon_pathkeys;/* list of "canonical" PathKeys */
288+
/* list of "canonical" PathKeys */
289+
List*canon_pathkeys;
255290

256-
List*left_join_clauses;/* list of RestrictInfos for mergejoinable
257-
* outer join clauses w/nonnullable var on
258-
* left */
291+
/*
292+
* list of RestrictInfos for mergejoinable outer join clauses
293+
* w/nonnullable var on left
294+
*/
295+
List*left_join_clauses;
259296

260-
List*right_join_clauses;/* list of RestrictInfos for mergejoinable
261-
* outer join clauses w/nonnullable var on
262-
* right */
297+
/*
298+
* list of RestrictInfos for mergejoinable outer join clauses
299+
* w/nonnullable var on right
300+
*/
301+
List*right_join_clauses;
263302

264-
List*full_join_clauses;/* list of RestrictInfos for mergejoinable
265-
* full join clauses */
303+
/*
304+
* list of RestrictInfos for mergejoinable full join clauses
305+
*/
306+
List*full_join_clauses;
266307

267-
List*join_info_list;/* list of SpecialJoinInfos */
308+
/* list of SpecialJoinInfos */
309+
List*join_info_list;
268310

269311
/*
270312
* all_result_relids is empty for SELECT, otherwise it contains at least
@@ -274,38 +316,55 @@ struct PlannerInfo
274316
* leaf_result_relids is similar except that only actual result tables,
275317
* not partitioned tables, are included in it.
276318
*/
277-
Relidsall_result_relids;/* set of all result relids */
278-
Relidsleaf_result_relids;/* set of all leaf relids */
319+
/* set of all result relids */
320+
Relidsall_result_relids;
321+
/* set of all leaf relids */
322+
Relidsleaf_result_relids;
279323

280324
/*
325+
* list of AppendRelInfos
326+
*
281327
* Note: for AppendRelInfos describing partitions of a partitioned table,
282328
* we guarantee that partitions that come earlier in the partitioned
283329
* table's PartitionDesc will appear earlier in append_rel_list.
284330
*/
285-
List*append_rel_list;/* list of AppendRelInfos */
331+
List*append_rel_list;
286332

287-
List*row_identity_vars;/* list of RowIdentityVarInfos */
333+
/* list of RowIdentityVarInfos */
334+
List*row_identity_vars;
288335

289-
List*rowMarks;/* list of PlanRowMarks */
336+
/* list of PlanRowMarks */
337+
List*rowMarks;
290338

291-
List*placeholder_list;/* list of PlaceHolderInfos */
339+
/* list of PlaceHolderInfos */
340+
List*placeholder_list;
292341

293-
List*fkey_list;/* list of ForeignKeyOptInfos */
342+
/* list of ForeignKeyOptInfos */
343+
List*fkey_list;
294344

295-
List*query_pathkeys;/* desired pathkeys for query_planner() */
345+
/* desired pathkeys for query_planner() */
346+
List*query_pathkeys;
296347

297-
List*group_pathkeys;/* groupClause pathkeys, if any */
298-
List*window_pathkeys;/* pathkeys of bottom window, if any */
299-
List*distinct_pathkeys;/* distinctClause pathkeys, if any */
300-
List*sort_pathkeys;/* sortClause pathkeys, if any */
348+
/* groupClause pathkeys, if any */
349+
List*group_pathkeys;
350+
/* pathkeys of bottom window, if any */
351+
List*window_pathkeys;
352+
/* distinctClause pathkeys, if any */
353+
List*distinct_pathkeys;
354+
/* sortClause pathkeys, if any */
355+
List*sort_pathkeys;
301356

302-
List*part_schemes;/* Canonicalised partition schemes used in the
303-
* query. */
357+
/* Canonicalised partition schemes used in the query. */
358+
List*part_schemes;
304359

305-
List*initial_rels;/* RelOptInfos we are now trying to join */
360+
/* RelOptInfos we are now trying to join */
361+
List*initial_rels;
306362

307-
/* Use fetch_upper_rel() to get any particular upper rel */
308-
List*upper_rels[UPPERREL_FINAL+1];/* upper-rel RelOptInfos */
363+
/*
364+
* Upper-rel RelOptInfos. Use fetch_upper_rel() to get any particular
365+
* upper rel.
366+
*/
367+
List*upper_rels[UPPERREL_FINAL+1];
309368

310369
/* Result tlists chosen by grouping_planner for upper-stage processing */
311370
structPathTarget*upper_targets[UPPERREL_FINAL+1];
@@ -340,39 +399,62 @@ struct PlannerInfo
340399
/* context holding PlannerInfo */
341400
MemoryContextplanner_cxt;
342401

343-
Cardinalitytotal_table_pages;/* # of pages in all non-dummy tables of
344-
* query */
345-
346-
Selectivitytuple_fraction;/* tuple_fraction passed to query_planner */
347-
Cardinalitylimit_tuples;/* limit_tuples passed to query_planner */
402+
/* # of pages in all non-dummy tables of query */
403+
Cardinalitytotal_table_pages;
348404

349-
Indexqual_security_level;/* minimum security_level for quals */
350-
/* Note: qual_security_level is zero if there are no securityQuals */
405+
/* tuple_fraction passed to query_planner */
406+
Selectivitytuple_fraction;
407+
/* limit_tuples passed to query_planner */
408+
Cardinalitylimit_tuples;
351409

352-
boolhasJoinRTEs;/* true if any RTEs are RTE_JOIN kind */
353-
boolhasLateralRTEs;/* true if any RTEs are marked LATERAL */
354-
boolhasHavingQual;/* true if havingQual was non-null */
355-
boolhasPseudoConstantQuals;/* true if any RestrictInfo has
356-
* pseudoconstant = true */
357-
boolhasAlternativeSubPlans;/* true if we've made any of those */
358-
boolhasRecursion;/* true if planning a recursive WITH item */
410+
/*
411+
* Minimum security_level for quals. Note: qual_security_level is zero if
412+
* there are no securityQuals.
413+
*/
414+
Indexqual_security_level;
415+
416+
/* true if any RTEs are RTE_JOIN kind */
417+
boolhasJoinRTEs;
418+
/* true if any RTEs are marked LATERAL */
419+
boolhasLateralRTEs;
420+
/* true if havingQual was non-null */
421+
boolhasHavingQual;
422+
/* true if any RestrictInfo has pseudoconstant = true */
423+
boolhasPseudoConstantQuals;
424+
/* true if we've made any of those */
425+
boolhasAlternativeSubPlans;
426+
/* true if planning a recursive WITH item */
427+
boolhasRecursion;
359428

360429
/*
361430
* Information about aggregates. Filled by preprocess_aggrefs().
362431
*/
363-
List*agginfos;/* AggInfo structs */
364-
List*aggtransinfos;/* AggTransInfo structs */
365-
intnumOrderedAggs;/* number w/ DISTINCT/ORDER BY/WITHIN GROUP */
366-
boolhasNonPartialAggs;/* does any agg not support partial mode? */
367-
boolhasNonSerialAggs;/* is any partial agg non-serializable? */
432+
/* AggInfo structs */
433+
List*agginfos;
434+
/* AggTransInfo structs */
435+
List*aggtransinfos;
436+
/* number w/ DISTINCT/ORDER BY/WITHIN GROUP */
437+
intnumOrderedAggs;
438+
/* does any agg not support partial mode? */
439+
boolhasNonPartialAggs;
440+
/* is any partial agg non-serializable? */
441+
boolhasNonSerialAggs;
368442

369-
/* These fields are used only when hasRecursion is true: */
370-
intwt_param_id;/* PARAM_EXEC ID for the work table */
371-
structPath*non_recursive_path;/* a path for non-recursive term */
443+
/*
444+
* These fields are used only when hasRecursion is true:
445+
*/
446+
/* PARAM_EXEC ID for the work table */
447+
intwt_param_id;
448+
/* a path for non-recursive term */
449+
structPath*non_recursive_path;
372450

373-
/* These fields are workspace for createplan.c */
374-
RelidscurOuterRels;/* outer rels above current node */
375-
List*curOuterParams;/* not-yet-assigned NestLoopParams */
451+
/*
452+
* These fields are workspace for createplan.c
453+
*/
454+
/* outer rels above current node */
455+
RelidscurOuterRels;
456+
/* not-yet-assigned NestLoopParams */
457+
List*curOuterParams;
376458

377459
/*
378460
* These fields are workspace for setrefs.c. Each is an array

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp