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

Commit cc4c90c

Browse files
author
Richard Guo
committed
Remove dead code in get_param_path_clause_serials()
The function get_param_path_clause_serials() is used to get the set of pushed-down clauses enforced within a parameterized Path. Since we don't currently support parameterized MergeAppend paths, and it doesn't look like that is going to change anytime soon (as explained in the comments for generate_orderedappend_paths), we don't need to consider MergeAppendPath in this function. This change won't make any measurable difference in performance; it's just for clarity's sake. Author: Richard Guo Reviewed-by: Andrei Lepikhov Discussion: https://postgr.es/m/CAMbWs4_Puie4DQ2ODvjQB_3CxYkUODnrJm8jn_ObMAcrjYNW7Q@mail.gmail.com
1 parent a8ccf4e commit cc4c90c

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

src/backend/optimizer/util/relnode.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,13 @@ get_param_path_clause_serials(Path *path)
19111911
{
19121912
if (path->param_info == NULL)
19131913
return NULL; /* not parameterized */
1914+
1915+
/*
1916+
* We don't currently support parameterized MergeAppend paths, as
1917+
* explained in the comments for generate_orderedappend_paths.
1918+
*/
1919+
Assert(!IsA(path, MergeAppendPath));
1920+
19141921
if (IsA(path, NestPath) ||
19151922
IsA(path, MergePath) ||
19161923
IsA(path, HashPath))
@@ -1964,27 +1971,6 @@ get_param_path_clause_serials(Path *path)
19641971
}
19651972
return pserials;
19661973
}
1967-
else if (IsA(path, MergeAppendPath))
1968-
{
1969-
/* Same as AppendPath case */
1970-
MergeAppendPath *apath = (MergeAppendPath *) path;
1971-
Bitmapset *pserials;
1972-
ListCell *lc;
1973-
1974-
pserials = NULL;
1975-
foreach(lc, apath->subpaths)
1976-
{
1977-
Path *subpath = (Path *) lfirst(lc);
1978-
Bitmapset *subserials;
1979-
1980-
subserials = get_param_path_clause_serials(subpath);
1981-
if (lc == list_head(apath->subpaths))
1982-
pserials = bms_copy(subserials);
1983-
else
1984-
pserials = bms_int_members(pserials, subserials);
1985-
}
1986-
return pserials;
1987-
}
19881974
else
19891975
{
19901976
/*

0 commit comments

Comments
 (0)