Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d00cf4

Browse files
committed
Remove some redundant set_cheapest() calls.
Commit e2fa76d centralized the responsibility for doing set_cheapest() for a baserel, but these functions added later seemingly didn't get the memo. There's no apparent reason why we need the cheapest path for these relation types to be available any sooner than it is for other base relation types, so delete the duplicate calls. Doesn't save much since there's only one path in these cases, but it might improve clarity. Richard Guo Discussion: https://postgr.es/m/CAMbWs4-KFEU_fDuJPNCOkUu3rwvZvKBEytkd9VrM4kH4-2h1CQ@mail.gmail.com
1 parent d365ae7 commit 9d00cf4

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/backend/optimizer/path/allpaths.c

-6
Original file line numberDiff line numberDiff line change
@@ -2966,9 +2966,6 @@ set_namedtuplestore_pathlist(PlannerInfo *root, RelOptInfo *rel,
29662966

29672967
/* Generate appropriate path */
29682968
add_path(rel, create_namedtuplestorescan_path(root, rel, required_outer));
2969-
2970-
/* Select cheapest path (pretty easy in this case...) */
2971-
set_cheapest(rel);
29722969
}
29732970

29742971
/*
@@ -2996,9 +2993,6 @@ set_result_pathlist(PlannerInfo *root, RelOptInfo *rel,
29962993

29972994
/* Generate appropriate path */
29982995
add_path(rel, create_resultscan_path(root, rel, required_outer));
2999-
3000-
/* Select cheapest path (pretty easy in this case...) */
3001-
set_cheapest(rel);
30022996
}
30032997

30042998
/*

0 commit comments

Comments
 (0)