Peter Eisentraut <peter_e@gmx.net> writes:
> Actually, what will more likely happen is that we'll define a collation as
> a collection of one or more support functions, the equivalents of
> strxfrm() and possibly a few more. Then it will be up to those functions
> to define the collation order. The server will provide utility functions
> that will facilitate implementing a collation order that follows the
> Unicode collation algorithm, but you could just as well implement one
> using memcmp() or whatever you like.
That sounds like a good plan to me. Personally I'd want a
memcmp()-based collation implementation available, so that people who
don't care about sorting anything beyond 7-bit ASCII don't need to pay
a lot of overhead.
We have seen over and over that strcoll() is depressingly slow in some
locales (at least on some platforms). Do you have any feeling for the
real-world performance of the Unicode algorithm?
regards, tom lane