aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2019-07-17 18:13:39 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2019-07-18 11:30:12 +0200
commit3944e855bc5bee32d99a9ba2245a026d4bafe282 (patch)
treed3c17e54cd25d4f85ce84bc94f5e26afe10df772 /src
parentfa7bb9345370ab69cac24b7213262f36567d9c9c (diff)
downloadpostgresql-3944e855bc5bee32d99a9ba2245a026d4bafe282.tar.gz
postgresql-3944e855bc5bee32d99a9ba2245a026d4bafe282.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/statistics/mcv.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 913a72ff673..e62421dfa88 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -1577,8 +1577,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
if (ok)
{
- TypeCacheEntry *typecache;
- FmgrInfo gtproc;
Var *var;
Const *cst;
bool isgt;
@@ -1596,10 +1594,6 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
/* match the attribute to a dimension of the statistic */
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), &gtproc);
-
/*
* Walk through the MCV items and evaluate the current clause.
* We can skip items that were already ruled out, and