RE: Progress report on locale safe LIKE indexing

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема RE: Progress report on locale safe LIKE indexing
Дата
Msg-id EKEJJICOHDIEMGPNIFIJMECNFDAA.Inoue@tpf.co.jp
обсуждение исходный текст
Ответ на Re: Progress report on locale safe LIKE indexing  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
> -----Original Message-----
> From: Peter Eisentraut
>
> Hiroshi Inoue writes:
>
> > If your solution is short-lived, your change would be not
> > only useless but also harmful. So I expect locale-aware
> > people to confirm that we are in the right direction.
>
> I am a bit confused here.  We have tinkered with LIKE indexing at least a
> year.  Now that a solution is found that *works*, it is claimed that it is
> harmful because LIKE was doing the wrong thing in the first place.  OTOH,
> I have not seen anyone independently claim that LIKE is wrong, nor do I
> see anyone proposing to actually change it.

Probably no one has used such a (useful) locale that
strcoll(str1, str2) == 0 but strcmp(str1, str2) != 0
with PostgreSQL. As long as the vagueness with LIKE
is held within utils/adt/like.c I won't complain.

> If we install my fix now we
> have a system that works better than the previous release with no change
> in semantics.  If someone wants to change LIKE at a later point, reverting
> my changes would be the least part of that work.

If your change is useful, the change would be hard to revert.
We had better be more careful about the change.
For example, you are defining text_binary_ops on text data type
but how about introduing a new data type (text collate ASCII) and
define text_ascii_ops on the new type ? We could use operators
like =, <=, >= instead of $=$, $<=$, $>=$ ...  We may be able to
to lay the foundation of the collate support for individual column
by changing existent text type as (text collate some_collate) .

regards,
Hiroshi Inoue



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: GiST patches for 7.2 (please apply)
Следующее
От: "Colin 't Hart"
Дата:
Сообщение: Re: Re: Link to bug webpage / Bugzilla?