mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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
This commit is contained in:
@ -1911,6 +1911,13 @@ get_param_path_clause_serials(Path *path)
|
|||||||
{
|
{
|
||||||
if (path->param_info == NULL)
|
if (path->param_info == NULL)
|
||||||
return NULL; /* not parameterized */
|
return NULL; /* not parameterized */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We don't currently support parameterized MergeAppend paths, as
|
||||||
|
* explained in the comments for generate_orderedappend_paths.
|
||||||
|
*/
|
||||||
|
Assert(!IsA(path, MergeAppendPath));
|
||||||
|
|
||||||
if (IsA(path, NestPath) ||
|
if (IsA(path, NestPath) ||
|
||||||
IsA(path, MergePath) ||
|
IsA(path, MergePath) ||
|
||||||
IsA(path, HashPath))
|
IsA(path, HashPath))
|
||||||
@ -1964,27 +1971,6 @@ get_param_path_clause_serials(Path *path)
|
|||||||
}
|
}
|
||||||
return pserials;
|
return pserials;
|
||||||
}
|
}
|
||||||
else if (IsA(path, MergeAppendPath))
|
|
||||||
{
|
|
||||||
/* Same as AppendPath case */
|
|
||||||
MergeAppendPath *apath = (MergeAppendPath *) path;
|
|
||||||
Bitmapset *pserials;
|
|
||||||
ListCell *lc;
|
|
||||||
|
|
||||||
pserials = NULL;
|
|
||||||
foreach(lc, apath->subpaths)
|
|
||||||
{
|
|
||||||
Path *subpath = (Path *) lfirst(lc);
|
|
||||||
Bitmapset *subserials;
|
|
||||||
|
|
||||||
subserials = get_param_path_clause_serials(subpath);
|
|
||||||
if (lc == list_head(apath->subpaths))
|
|
||||||
pserials = bms_copy(subserials);
|
|
||||||
else
|
|
||||||
pserials = bms_int_members(pserials, subserials);
|
|
||||||
}
|
|
||||||
return pserials;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user