pgsql: Second pass at improving LIKE/regex estimation in non-C locales.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Second pass at improving LIKE/regex estimation in non-C locales.
Date: 2007-11-09 20:10:02
Message-ID: 20071109201002.3BB507540F0@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Second pass at improving LIKE/regex estimation in non-C locales. It turns
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.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
selfuncs.c (r1.238 -> r1.239)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.238&r2=1.239)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-11-09 20:10:09 pgsql: Second pass at improving LIKE/regex estimation in non-C locales.
Previous Message Gregory Stark 2007-11-09 18:41:19 Re: pgsql: If an index depends on no columns of its table, give it a