Re: Locale and LIKE matching

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Locale and LIKE matching
Дата
Msg-id Pine.LNX.4.30.0103310001330.1063-100000@peter.localdomain
обсуждение исходный текст
Ответ на Locale and LIKE matching  (Daniel Serodio <daniel@ibnetwork.com.br>)
Список pgsql-general
Daniel Serodio writes:

>     Hi! I'd like to know if the LIKE operator is locale-aware when matching
> strings. Specifically, I'd like to have "... LIKE '%a%'" match "á" (á)or
> "ã" (ã) (these are ISO8859-1, pt_BR chars). Is this possible?

No, this is not part of standard locale support, nor the task of the LIKE
operator.  In general, "accent folding" is very situation dependent.

If you look into the pgsql-sql archives a few days back you will find a
link to a function that expands letters into a regular expression that
matches all(?) accented variants of it, which may suit you.

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


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

Предыдущее
От: "ADBAAMD"
Дата:
Сообщение: Re: Locale and LIKE matching
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Re: Data access permission?