diff options
Diffstat (limited to 'src/backend/optimizer/path/allpaths.c')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index e9342097e52..358bb2aed6f 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -2053,9 +2053,8 @@ accumulate_append_subpath(Path *path, List **subpaths, List **special_subpaths) *subpaths = list_concat(*subpaths, list_copy_tail(apath->subpaths, apath->first_partial_path)); - new_special_subpaths = - list_truncate(list_copy(apath->subpaths), - apath->first_partial_path); + new_special_subpaths = list_copy_head(apath->subpaths, + apath->first_partial_path); *special_subpaths = list_concat(*special_subpaths, new_special_subpaths); return; @@ -3086,8 +3085,8 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel, root->query_pathkeys); else if (npathkeys > 0) useful_pathkeys_list = lappend(useful_pathkeys_list, - list_truncate(list_copy(root->query_pathkeys), - npathkeys)); + list_copy_head(root->query_pathkeys, + npathkeys)); } return useful_pathkeys_list; |