Re: Disabling case sensitivity

Поиск
Список
Период
Сортировка
От Adrian 'Dagurashibanipal' von Bidder
Тема Re: Disabling case sensitivity
Дата
Msg-id 1026461084.6775.74.camel@atlas
обсуждение исходный текст
Ответ на Re: Disabling case sensitivity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
On Thu, 2002-07-11 at 18:22, Stephan Szabo wrote:
> On Thu, 11 Jul 2002, ktt wrote:
>
> >
> > That's a problem, because I building
> > a UNICODE text database and planning case insensitive
> > search.
>
> You can do case insensitive searches as long as you're
> willing to use something other than var=literal (such
> as tolower(var)=lowerliteral or tolower(var)=tolower(literal)
> or var ILIKE literal).

As was pointed out this will not work in the general case for non-ascii.
I think it is necessary to code an explicit case insensitive and locale
aware string compare function. (the libc strcoll function seems to do
exactly that, except that it seems to be case sensitive, whereas
strncasecomp does not respect the locale, while it knows about charsets
and case).

cheers
-- vbi

--
secure email with gpg                         http://fortytwo.ch/gpg

Вложения

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

Предыдущее
От: Adrian 'Dagurashibanipal' von Bidder
Дата:
Сообщение: Re: Hardware for PG
Следующее
От: Uros Gruber
Дата:
Сообщение: What is better any why