mirror of https://github.com/postgres/postgres
Remove unnecessary clauses_attnums variable
Commitc676e659b2
reworked how choose_best_statistics() picks the best extended statistics, but failed to remove clauses_attnums which is now unnecessary. So get rid of it and backpatch to 12, same asc676e659b2
. Author: Tomas Vondra Discussion: https://postgr.es/m/CA+u7OA7H5rcE2=8f263w4NZD6ipO_XOrYB816nuLXbmSTH9pQQ@mail.gmail.com Backpatch-through: 12
This commit is contained in:
parent
c676e659b2
commit
6d61c3f1cb
|
@ -1206,7 +1206,6 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli
|
|||
RelOptInfo *rel, Bitmapset **estimatedclauses)
|
||||
{
|
||||
ListCell *l;
|
||||
Bitmapset *clauses_attnums = NULL;
|
||||
Bitmapset **list_attnums;
|
||||
int listidx;
|
||||
StatisticExtInfo *stat;
|
||||
|
@ -1244,10 +1243,7 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli
|
|||
|
||||
if (!bms_is_member(listidx, *estimatedclauses) &&
|
||||
statext_is_compatible_clause(root, clause, rel->relid, &attnums))
|
||||
{
|
||||
list_attnums[listidx] = attnums;
|
||||
clauses_attnums = bms_add_members(clauses_attnums, attnums);
|
||||
}
|
||||
else
|
||||
list_attnums[listidx] = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue