Re: COLLATE
От | Jan Behrens |
---|---|
Тема | Re: COLLATE |
Дата | |
Msg-id | 44900653.9040306@flexiguided.de обсуждение исходный текст |
Ответ на | COLLATE ("Filip Rembiałkowski" <plk.zuber@gmail.com>) |
Список | pgsql-general |
Filip Rembiałkowski wrote: > let's assume that we keep Unicode text data in the column. > sometimes we want to sort it according to specific collation order. > how can we force collation when running a query? Hi Filip, I had the same problem you have. As a solution I implemented a wrapper function named collkey(), which transforms a Unicode string into a sortable collation key using IBM's ICU library. Of course it's not as nice as having a standard SQL command for it, but i think it's a nice solution, until a good collation support is provided by PostgreSQL itself. You can find the source here: http://www.flexiguided.de/publications.pgcollkey.en.html I can understand that people don't want PostgreSQL being dependent of other libraries. The best solution for future would be implementing independent collation functions inside of PostgreSQL, which also support standard SQL syntax, but that's a lot of work, i think. Jan Behrens
В списке pgsql-general по дате отправления: