mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
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
This commit is contained in:
parent
fa7bb93453
commit
3944e855bc
@ -1577,8 +1577,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
|
|||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
TypeCacheEntry *typecache;
|
|
||||||
FmgrInfo gtproc;
|
|
||||||
Var *var;
|
Var *var;
|
||||||
Const *cst;
|
Const *cst;
|
||||||
bool isgt;
|
bool isgt;
|
||||||
@ -1596,10 +1594,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
|
|||||||
/* match the attribute to a dimension of the statistic */
|
/* match the attribute to a dimension of the statistic */
|
||||||
idx = bms_member_index(keys, var->varattno);
|
idx = bms_member_index(keys, var->varattno);
|
||||||
|
|
||||||
/* get information about the >= procedure */
|
|
||||||
typecache = lookup_type_cache(var->vartype, TYPECACHE_GT_OPR);
|
|
||||||
fmgr_info(get_opcode(typecache->gt_opr), >proc);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Walk through the MCV items and evaluate the current clause.
|
* Walk through the MCV items and evaluate the current clause.
|
||||||
* We can skip items that were already ruled out, and
|
* We can skip items that were already ruled out, and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user