Re: AW: like and optimization - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: AW: like and optimization
Date
Msg-id Pine.LNX.4.30.0101221704380.1090-100000@peter.localdomain
Whole thread Raw
In response to Re: AW: like and optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> Zeugswetter Andreas SB  <ZeugswetterA@wien.spardat.at> writes:
> > Just to understand things correctly. Is the Like optimization disabled
> > for all non-ASCII char sets, or (imho correctly) for non charset ordered
> > collations (LC_COLLATE) ?
>
> Currently it's disabled whenever LC_COLLATE is neither C nor POSIX.
> We can add other names to the "OK" list as we verify that they are safe
> (see locale_is_like_safe() in src/backend/utils/adt/selfuncs.c).

I have pretty severe doubts that any locale for a language that uses the
Latin, Cyrillic, or Greek alphabets (i.e., those that are conceptually
similar to English) is like-optimization safe (for the optimization
algorithm in its current state), at least across all platforms.
Somewhere a vendor is going to adhere to some ISO standard and implement
the same multi-pass "letters first" rules that we observed in en_US.

There should be some extensive "stress test" that a locale should have to
pass before being labelled safe.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: Re: MySQL and BerkleyDB (fwd)
Next
From: Peter Eisentraut
Date:
Subject: Re: Re: MySQL and BerkleyDB (fwd)