Re: Collation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Collation
Дата
Msg-id 17353.1465659788@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Collation  (Moritz Schepp <moritz.schepp@gmail.com>)
Ответы Re: Collation  (Moritz Schepp <moritz.schepp@gmail.com>)
Список pgsql-novice
Moritz Schepp <moritz.schepp@gmail.com> writes:
> My problem is that I don't (even) get the german collation to work, the
> following query yields 'f':

> SELECT 'a' COLLATE "german" LIKE 'ä' COLLATE "german";

> Shouldn't that be working?

No.  Postgres interprets COLLATE as having to do only with sort ordering.
What you want here, IIUC, is to do accent-stripping on the data and/or the
LIKE pattern before you compare them.  Take a look at the contrib/unaccent
module for one solution.

            regards, tom lane


В списке pgsql-novice по дате отправления:

Предыдущее
От: Moritz Schepp
Дата:
Сообщение: Collation
Следующее
От: Jim McNamara
Дата:
Сообщение: Fwd: pgadmin doesn't see tables?