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

Commit a4303a0

Browse files
committed
Remove unnecessary TYPECACHE_GT_OPR lookup
The TYPECACHE_GT_OPR is not needed (it used to be in older version of the MCV code), but the compiler failed to detect this as the result was used in a fmgr_info() call, populating a FmgrInfo entry. Backpatch to v12, where this code was introduced. Discussion: https://postgr.es/m/8736jdhbhc.fsf%40ansel.ydns.eu Backpatch-to: 12
1 parent 2103955 commit a4303a0

File tree

1 file changed

+0
-6
lines changed
  • src/backend/statistics

1 file changed

+0
-6
lines changed

src/backend/statistics/mcv.c

-6
Original file line numberDiff line numberDiff line change
@@ -1577,8 +1577,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
15771577

15781578
if (ok)
15791579
{
1580-
TypeCacheEntry *typecache;
1581-
FmgrInfo gtproc;
15821580
Var *var;
15831581
Const *cst;
15841582
bool isgt;
@@ -1596,10 +1594,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
15961594
/* match the attribute to a dimension of the statistic */
15971595
idx = bms_member_index(keys, var->varattno);
15981596

1599-
/* get information about the >= procedure */
1600-
typecache = lookup_type_cache(var->vartype, TYPECACHE_GT_OPR);
1601-
fmgr_info(get_opcode(typecache->gt_opr), &gtproc);
1602-
16031597
/*
16041598
* Walk through the MCV items and evaluate the current clause.
16051599
* We can skip items that were already ruled out, and

0 commit comments

Comments
 (0)