@@ -180,7 +180,7 @@ unpack_pickyappend_private(PickyAppendState *scan_state, CustomScan *cscan)
180
180
ListCell * plan_cell ;
181
181
List * custom_oids = (List * )lsecond (cscan -> custom_private );
182
182
int nchildren = list_length (custom_oids );
183
- HTAB * children_table = scan_state -> children_table ;
183
+ HTAB * children_table ;
184
184
HASHCTL * children_table_config = & scan_state -> children_table_config ;
185
185
int i ;
186
186
@@ -276,9 +276,9 @@ create_append_path_common(PlannerInfo *root,
276
276
}
277
277
278
278
Plan *
279
- create_append_plan_common (PlannerInfo * root ,RelOptInfo * rel ,
280
- CustomPath * best_path ,List * tlist ,
281
- List * clauses ,List * custom_plans ,
279
+ create_append_plan_common (PlannerInfo * root ,RelOptInfo * rel ,
280
+ CustomPath * best_path ,List * tlist ,
281
+ List * clauses ,List * custom_plans ,
282
282
CustomScanMethods * scan_methods )
283
283
{
284
284
PickyAppendPath * gpath = (PickyAppendPath * )best_path ;
@@ -301,7 +301,7 @@ create_append_plan_common(PlannerInfo* root, RelOptInfo* rel,
301
301
}
302
302
303
303
Node *
304
- create_append_scan_state_common (CustomScan * node ,
304
+ create_append_scan_state_common (CustomScan * node ,
305
305
CustomExecMethods * exec_methods ,
306
306
uint32 size )
307
307
{
329
329
begin_append_common (CustomScanState * node ,EState * estate ,int eflags )
330
330
{
331
331
PickyAppendState * scan_state = (PickyAppendState * )node ;
332
- HTAB * plan_state_table = scan_state -> plan_state_table ;
332
+ HTAB * plan_state_table ;
333
333
HASHCTL * plan_state_table_config = & scan_state -> plan_state_table_config ;
334
334
335
335
memset (plan_state_table_config ,0 ,sizeof (HASHCTL ));
@@ -341,8 +341,9 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
341
341
HASH_ELEM |HASH_BLOBS );
342
342
343
343
scan_state -> plan_state_table = plan_state_table ;
344
- scan_state -> custom_expr_states = (List * )ExecInitExpr ((Expr * )scan_state -> custom_exprs ,
345
- (PlanState * )scan_state );
344
+ scan_state -> custom_expr_states =
345
+ (List * )ExecInitExpr ((Expr * )scan_state -> custom_exprs ,
346
+ (PlanState * )scan_state );
346
347
}
347
348
348
349
void
@@ -399,10 +400,8 @@ rescan_append_common(CustomScanState *node)
399
400
}
400
401
401
402
void
402
- explain_append_common (CustomScanState * node ,HTAB * children_table ,ExplainState * es )
403
+ explain_append_common (CustomScanState * node ,HTAB * children_table ,ExplainState * es )
403
404
{
404
- PickyAppendState * scan_state = (PickyAppendState * )node ;
405
-
406
405
/* Construct excess PlanStates */
407
406
if (!es -> analyze )
408
407
{
@@ -416,7 +415,8 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
416
415
/* There can't be any nodes since we're not scanning anything */
417
416
Assert (!node -> custom_ps );
418
417
419
- hash_seq_init (& seqstat ,scan_state -> children_table );
418
+ /* Iterate through node's ChildScanCommon table */
419
+ hash_seq_init (& seqstat ,children_table );
420
420
421
421
while ((child = (ChildScanCommon )hash_seq_search (& seqstat )))
422
422
{
@@ -438,7 +438,7 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
438
438
439
439
/*
440
440
* These PlanStates will be used by EXPLAIN,
441
- *pickyappend_end will destroy them eventually
441
+ *end_append_common will destroy them eventually
442
442
*/
443
443
for (i = 0 ;i < used ;i ++ )
444
444
node -> custom_ps = lappend (node -> custom_ps ,