@@ -180,7 +180,7 @@ unpack_pickyappend_private(PickyAppendState *scan_state, CustomScan *cscan)
180180ListCell * plan_cell ;
181181List * custom_oids = (List * )lsecond (cscan -> custom_private );
182182int nchildren = list_length (custom_oids );
183- HTAB * children_table = scan_state -> children_table ;
183+ HTAB * children_table ;
184184HASHCTL * children_table_config = & scan_state -> children_table_config ;
185185int i ;
186186
@@ -276,9 +276,9 @@ create_append_path_common(PlannerInfo *root,
276276}
277277
278278Plan *
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 ,
282282CustomScanMethods * scan_methods )
283283{
284284PickyAppendPath * gpath = (PickyAppendPath * )best_path ;
@@ -301,7 +301,7 @@ create_append_plan_common(PlannerInfo* root, RelOptInfo* rel,
301301}
302302
303303Node *
304- create_append_scan_state_common (CustomScan * node ,
304+ create_append_scan_state_common (CustomScan * node ,
305305CustomExecMethods * exec_methods ,
306306uint32 size )
307307{
329329begin_append_common (CustomScanState * node ,EState * estate ,int eflags )
330330{
331331PickyAppendState * scan_state = (PickyAppendState * )node ;
332- HTAB * plan_state_table = scan_state -> plan_state_table ;
332+ HTAB * plan_state_table ;
333333HASHCTL * plan_state_table_config = & scan_state -> plan_state_table_config ;
334334
335335memset (plan_state_table_config ,0 ,sizeof (HASHCTL ));
@@ -341,8 +341,9 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
341341HASH_ELEM |HASH_BLOBS );
342342
343343scan_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 );
346347}
347348
348349void
@@ -399,10 +400,8 @@ rescan_append_common(CustomScanState *node)
399400}
400401
401402void
402- explain_append_common (CustomScanState * node ,HTAB * children_table ,ExplainState * es )
403+ explain_append_common (CustomScanState * node ,HTAB * children_table ,ExplainState * es )
403404{
404- PickyAppendState * scan_state = (PickyAppendState * )node ;
405-
406405/* Construct excess PlanStates */
407406if (!es -> analyze )
408407{
@@ -416,7 +415,8 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
416415/* There can't be any nodes since we're not scanning anything */
417416Assert (!node -> custom_ps );
418417
419- hash_seq_init (& seqstat ,scan_state -> children_table );
418+ /* Iterate through node's ChildScanCommon table */
419+ hash_seq_init (& seqstat ,children_table );
420420
421421while ((child = (ChildScanCommon )hash_seq_search (& seqstat )))
422422{
@@ -438,7 +438,7 @@ explain_append_common(CustomScanState *node, HTAB* children_table, ExplainState
438438
439439/*
440440 * These PlanStates will be used by EXPLAIN,
441- *pickyappend_end will destroy them eventually
441+ *end_append_common will destroy them eventually
442442 */
443443for (i = 0 ;i < used ;i ++ )
444444node -> custom_ps = lappend (node -> custom_ps ,