Re: Yet another LIKE-indexing scheme

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Yet another LIKE-indexing scheme
Дата
Msg-id 8611.968021297@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Yet another LIKE-indexing scheme  (Erich Stamberger <eberger@gewi.kfunigraz.ac.at>)
Ответы Re: Yet another LIKE-indexing scheme
Список pgsql-hackers
Erich Stamberger <eberger@gewi.kfunigraz.ac.at> writes:
>> Our existing code fails because it generates WHERE name >= 'Czec' AND
>> name < 'Czed'; it will therefore not find names beginning 'Czech'
>> because those are in another part of the index, between 'Czeh' and
>> 'Czei'.  But WHERE name >= 'Cze' AND name < 'Czf' would work.

> The Problem is: What tells us, that it is 'f' which sorts
> after 'e' in that locale?

We keep trying until we find a character that *does* sort after 'e'.
I did say I was assuming that people had read the previous discussion
and knew what the existing approach was ;-)

However I've since thought of a different counterexample: if the LIKE
pattern is 'Czech%' and we strip off the 'h', we lose since we'll be
looking between 'Czec' and 'Czed' but the desired strings are in the
index between 'Czeh' and 'Czei'.  Back to the drawing board...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] psql can crash the backend on login
Следующее
От: Tom Lane
Дата:
Сообщение: Viability of VARLENA_FIXED_SIZE()