RE: Progress report on locale safe LIKE indexing

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Progress report on locale safe LIKE indexing
Date: 2001-08-22 14:49:11
Message-ID: EKEJJICOHDIEMGPNIFIJMECNFDAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Colin 't Hart 2001-08-22 14:55:46 Re: Re: Link to bug webpage / Bugzilla?
Previous Message Colin 't Hart 2001-08-22 14:46:29 Re: Link to bug webpage