Thread: pgsql: Change patternsel (LIKE/regex selectivity estimation) so that if

pgsql: Change patternsel (LIKE/regex selectivity estimation) so that if

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Change patternsel (LIKE/regex selectivity estimation) so that if there
is a large enough histogram, it will use the number of matches in the
histogram to derive a selectivity estimate, rather than the admittedly
pretty bogus heuristics involving examining the pattern contents.  I set
'large enough' at 100, but perhaps we should change that later.  Also
apply the same technique in contrib/ltree's <@ and @> estimator.  Per
discussion with Stefan Kaltenbrunner and Matteo Beccati.

Modified Files:
--------------
    pgsql/contrib/ltree:
        ltree_op.c (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/ltree/ltree_op.c.diff?r1=1.12&r2=1.13)
    pgsql/src/backend/utils/adt:
        selfuncs.c (r1.212 -> r1.213)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c.diff?r1=1.212&r2=1.213)
    pgsql/src/include/utils:
        selfuncs.h (r1.34 -> r1.35)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/selfuncs.h.diff?r1=1.34&r2=1.35)