Re: LIKE indexing proposal

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: LIKE indexing proposal
Дата
Msg-id Pine.LNX.4.44.0305131009410.1617-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: LIKE indexing proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> Peter Eisentraut <peter_e@gmx.net> writes:
> > I would like to re-table my proposal from many moons ago to allow
> > pattern-matching operations to use indexes under any locale.
>
> Do you have better answers to the objections that were raised the last
> time?

The objection last time was that, according to the SQL standard, LIKE
patterns should use the locale-specific collation order for the fixed
parts (instead of character-by-character comparisons), and that under that
rule my proposed solution would fall down.

Time has shown that this objection is poor on four grounds:

1. LIKE does not work that way, and omitting optimizations now based on
possible future changes is a stupid approach.

2. If LIKE were to be changed that way, we can always take the
optimization out.

3. Even if LIKE were changed, certainly POSIX regexps would never be
changed, so you can still use the optimization there.

4. Nobody is seriously proposing to change LIKE that way.  And if someone
did, I would object, because the established collation rules make getting
consistent results from this approach impossible.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: "postgresql"
Дата:
Сообщение: can we implement the updatable view through rule system?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: patch src/bin/psql/help.c