Re: Disabling case sensitivity - Mailing list pgsql-general

From Adrian 'Dagurashibanipal' von Bidder
Subject Re: Disabling case sensitivity
Date
Msg-id 1026461084.6775.74.camel@atlas
Whole thread Raw
In response to Re: Disabling case sensitivity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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

Attachment

pgsql-general by date:

Previous
From: Adrian 'Dagurashibanipal' von Bidder
Date:
Subject: Re: Hardware for PG
Next
From: Uros Gruber
Date:
Subject: What is better any why