1010#include "postgres.h"
1111#include "optimizer/paths.h"
1212#include "nodes_common.h"
13- #include "pickyappend .h"
13+ #include "runtimeappend .h"
1414
1515
1616
@@ -46,7 +46,7 @@ free_child_scan_common_array(ChildScanCommon *cur_plans, int n)
4646}
4747
4848static void
49- transform_plans_into_states (PickyAppendState * scan_state ,
49+ transform_plans_into_states (RuntimeAppendState * scan_state ,
5050ChildScanCommon * selected_plans ,int n ,
5151EState * estate )
5252{
@@ -152,7 +152,7 @@ get_partition_oids(List *ranges, int *n, PartRelationInfo *prel)
152152}
153153
154154static void
155- pack_pickyappend_private (CustomScan * cscan ,PickyAppendPath * path )
155+ pack_runtimeappend_private (CustomScan * cscan ,RuntimeAppendPath * path )
156156{
157157ChildScanCommon * children = path -> children ;
158158int nchildren = path -> nchildren ;
@@ -162,7 +162,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
162162
163163for (i = 0 ;i < nchildren ;i ++ )
164164{
165- /* We've already filled 'custom_paths' increate_pickyappend_path */
165+ /* We've already filled 'custom_paths' increate_runtimeappend_path */
166166custom_oids = lappend_oid (custom_oids ,children [i ]-> relid );
167167pfree (children [i ]);
168168}
@@ -174,7 +174,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
174174}
175175
176176static void
177- unpack_pickyappend_private ( PickyAppendState * scan_state ,CustomScan * cscan )
177+ unpack_runtimeappend_private ( RuntimeAppendState * scan_state ,CustomScan * cscan )
178178{
179179ListCell * oid_cell ;
180180ListCell * plan_cell ;
@@ -216,19 +216,19 @@ Path *
216216create_append_path_common (PlannerInfo * root ,
217217AppendPath * inner_append ,
218218ParamPathInfo * param_info ,
219- List * picky_clauses ,
219+ List * runtime_clauses ,
220220CustomPathMethods * path_methods ,
221221double sel )
222222{
223- RelOptInfo * innerrel = inner_append -> path .parent ;
224- ListCell * lc ;
225- int i ;
223+ RelOptInfo * innerrel = inner_append -> path .parent ;
224+ ListCell * lc ;
225+ int i ;
226226
227- RangeTblEntry * inner_entry = root -> simple_rte_array [innerrel -> relid ];
227+ RangeTblEntry * inner_entry = root -> simple_rte_array [innerrel -> relid ];
228228
229- PickyAppendPath * result ;
229+ RuntimeAppendPath * result ;
230230
231- result = palloc0 (sizeof (PickyAppendPath ));
231+ result = palloc0 (sizeof (RuntimeAppendPath ));
232232NodeSetTag (result ,T_CustomPath );
233233
234234result -> cpath .path .pathtype = T_CustomScan ;
@@ -247,7 +247,7 @@ create_append_path_common(PlannerInfo *root,
247247result -> cpath .path .total_cost = 0.0 ;
248248
249249/* Set 'partitioned column'-related clauses */
250- result -> cpath .custom_private = picky_clauses ;
250+ result -> cpath .custom_private = runtime_clauses ;
251251result -> cpath .custom_paths = NIL ;
252252
253253Assert (inner_entry -> relid != 0 );
@@ -258,9 +258,9 @@ create_append_path_common(PlannerInfo *root,
258258i = 0 ;
259259foreach (lc ,inner_append -> subpaths )
260260{
261- Path * path = lfirst (lc );
262- Index relindex = path -> parent -> relid ;
263- ChildScanCommon child = palloc (sizeof (ChildScanCommonData ));
261+ Path * path = lfirst (lc );
262+ Index relindex = path -> parent -> relid ;
263+ ChildScanCommon child = palloc (sizeof (ChildScanCommonData ));
264264
265265result -> cpath .path .startup_cost += path -> startup_cost ;
266266result -> cpath .path .total_cost += path -> total_cost ;
@@ -288,7 +288,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
288288List * clauses ,List * custom_plans ,
289289CustomScanMethods * scan_methods )
290290{
291- PickyAppendPath * gpath = (PickyAppendPath * )best_path ;
291+ RuntimeAppendPath * gpath = (RuntimeAppendPath * )best_path ;
292292CustomScan * cscan ;
293293
294294cscan = makeNode (CustomScan );
@@ -302,7 +302,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
302302
303303cscan -> methods = scan_methods ;
304304
305- pack_pickyappend_private (cscan ,gpath );
305+ pack_runtimeappend_private (cscan ,gpath );
306306
307307return & cscan -> scan .plan ;
308308}
@@ -312,14 +312,14 @@ create_append_scan_state_common(CustomScan *node,
312312CustomExecMethods * exec_methods ,
313313uint32 size )
314314{
315- PickyAppendState * scan_state = palloc0 (size );
315+ RuntimeAppendState * scan_state = palloc0 (size );
316316
317317NodeSetTag (scan_state ,T_CustomScanState );
318318scan_state -> css .flags = node -> flags ;
319319scan_state -> css .methods = exec_methods ;
320320scan_state -> custom_exprs = node -> custom_exprs ;
321321
322- unpack_pickyappend_private (scan_state ,node );
322+ unpack_runtimeappend_private (scan_state ,node );
323323
324324/* Fill in relation info using main table's relid */
325325scan_state -> prel = get_pathman_relation_info (scan_state -> relid ,NULL );
@@ -335,7 +335,7 @@ create_append_scan_state_common(CustomScan *node,
335335void
336336begin_append_common (CustomScanState * node ,EState * estate ,int eflags )
337337{
338- PickyAppendState * scan_state = (PickyAppendState * )node ;
338+ RuntimeAppendState * scan_state = (RuntimeAppendState * )node ;
339339HTAB * plan_state_table ;
340340HASHCTL * plan_state_table_config = & scan_state -> plan_state_table_config ;
341341
@@ -356,7 +356,7 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
356356void
357357end_append_common (CustomScanState * node )
358358{
359- PickyAppendState * scan_state = (PickyAppendState * )node ;
359+ RuntimeAppendState * scan_state = (RuntimeAppendState * )node ;
360360
361361clear_plan_states (& scan_state -> css );
362362hash_destroy (scan_state -> plan_state_table );
@@ -366,7 +366,7 @@ end_append_common(CustomScanState *node)
366366void
367367rescan_append_common (CustomScanState * node )
368368{
369- PickyAppendState * scan_state = (PickyAppendState * )node ;
369+ RuntimeAppendState * scan_state = (RuntimeAppendState * )node ;
370370ExprContext * econtext = node -> ss .ps .ps_ExprContext ;
371371PartRelationInfo * prel = scan_state -> prel ;
372372List * ranges ;