1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Fix selectivity estimation @> (anymultirange, anyrange) operator

Attempt to get selectivity estimation for @> (anymultirange, anyrange) operator
caused an error in buildfarm, because this operator was missed in switch()
of calc_hist_selectivity().  Fix that and also make regression tests reliably
check that selectivity estimation for (multi)ranges doesn't fall.  Previously,
whether we test selectivity estimation for (multi)ranges depended on
whether autovacuum managed to gather concurrently to the test.

Reported-by: Michael Paquier
Discussion: https://postgr.es/m/X%2BwmgjRItuvHNBeV%40paquier.xyz
This commit is contained in:
Alexander Korotkov
2020-12-30 20:19:15 +03:00
parent 860fe27ee1
commit 62097a4cc8
5 changed files with 23 additions and 0 deletions

View File

@ -649,6 +649,7 @@ calc_hist_selectivity(TypeCacheEntry *typcache, VariableStatData *vardata,
case OID_MULTIRANGE_RANGE_CONTAINED_OP:
case OID_MULTIRANGE_MULTIRANGE_CONTAINED_OP:
case OID_RANGE_MULTIRANGE_CONTAINED_OP:
if (const_lower.infinite)
{
/*