Remove unnecessary clauses_attnums variable

Commit c676e659b2 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 as c676e659b2.

Author: Tomas Vondra
Discussion: https://postgr.es/m/CA+u7OA7H5rcE2=8f263w4NZD6ipO_XOrYB816nuLXbmSTH9pQQ@mail.gmail.com
Backpatch-through: 12
This commit is contained in:
Tomas Vondra 2019-11-28 23:25:14 +01:00
parent c676e659b2
commit 6d61c3f1cb
1 changed files with 0 additions and 4 deletions

View File

@ -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;