RE: Progress report on locale safe LIKE indexing
От | Hiroshi Inoue |
---|---|
Тема | RE: Progress report on locale safe LIKE indexing |
Дата | |
Msg-id | EKEJJICOHDIEMGPNIFIJCEJMFCAA.Inoue@tpf.co.jp обсуждение исходный текст |
Ответ на | RE: Progress report on locale safe LIKE indexing (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
RE: Progress report on locale safe LIKE indexing
|
Список | pgsql-hackers |
> -----Original Message----- > From: Peter Eisentraut > > Hiroshi Inoue writes: > > > Please look at my first question. > > This depends on the assumption that '=' is equivalent in > > any locale. Is it guaranteed ? > > For example, ( 'a' = 'A' ) isn't allowed in any locale ?. > > > > And your answer was > > The whole point here is not to rely on '='. > > > > Clearly your theory depends on the assumption that > > If a = b in some locale then a = b in ASCII locale. > > > > And where does 'a' <> 'A' come from ? > > The definition of '=' is a part of collating sequence. > > > > > > > > > LIKE seems to use the collating sequence. > > > > > > No. The collating sequence defines the order of all possible strings. > > > LIKE doesn't order anything. > > > > Again where does it come from ? > > Let me elaborate again: > > Now, if you look at the code that does the LIKE pattern matching you'll > see that it does not use any locale features, it simply compares > characters for equality based on their character codes, accounting for the > wildcards. Consequentially, this whole operation has nothing to do with > locales. Oh I see your point. Hmm * string1 = string2 * doesn't imply * string1 LIKE string2 * ? Otherwise the current criterion of LIKE matching unwittingly assumes that there's no locale that has the different definition of '=' from that of ASCII locale. I don't think the current implementation is strictly right. regards, Hiroshi Inoue
В списке pgsql-hackers по дате отправления: