@@ -185,7 +185,7 @@ create_pickyappend_path(PlannerInfo *root,
185
185
ParamPathInfo * param_info ,
186
186
JoinPathExtraData * extra )
187
187
{
188
- AppendPath * inner_append = (AppendPath * )innerrel -> cheapest_total_path ;
188
+ AppendPath * inner_append = (AppendPath * )linitial ( innerrel -> cheapest_parameterized_paths ) ;
189
189
List * joinrestrictclauses = extra -> restrictlist ;
190
190
List * joinclauses ;
191
191
List * otherclauses ;
@@ -282,7 +282,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
282
282
283
283
if (innerrel -> reloptkind == RELOPT_BASEREL &&
284
284
inner_entry -> inh &&
285
- IsA (innerrel -> cheapest_total_path ,AppendPath )&&
285
+ IsA (linitial ( innerrel -> cheapest_parameterized_paths ) ,AppendPath )&&
286
286
(inner_prel = get_pathman_relation_info (inner_entry -> relid ,NULL )))
287
287
{
288
288
elog (LOG ,"adding new nestloop path with pickyappend" );
@@ -291,7 +291,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
291
291
292
292
outer = outerrel -> cheapest_total_path ;
293
293
294
- inner_required = bms_union (PATH_REQ_OUTER (innerrel -> cheapest_total_path ),
294
+ inner_required = bms_union (PATH_REQ_OUTER (( Path * ) linitial ( innerrel -> cheapest_parameterized_paths ) ),
295
295
bms_make_singleton (outerrel -> relid ));
296
296
297
297
inner = create_pickyappend_path (root ,joinrel ,outerrel ,innerrel ,