• Tom Lane's avatar
    Second pass at improving LIKE/regex estimation in non-C locales. It turns · a96fa850
    Tom Lane authored
    out that it's actually quite likely that a string that is an extension of
    the given prefix will sort as larger than the "greater" string our previous
    code created.  To provide some defense against that, do the comparisons
    against a modified string instead of just the bare prefix.  We tack on
    "Z", "z", "y", or "9", whichever is seen as largest in the current locale.
    Testing suggests that this is sufficient at least for cases involving
    ASCII data.
    a96fa850
selfuncs.c 150 KB