Re: Disabling case sensitivity

From: Adrian 'Dagurashibanipal' von Bidder <avbidder(at)fortytwo(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Disabling case sensitivity
Date: 2002-07-12 08:04:43
Message-ID: 1026461084.6775.74.camel@atlas
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-07-12 15:20:04 Re: How to upgrade the pgsql archiver?
Previous Message Bernal Fernandez 2002-07-12 05:12:47 Help

Browse pgsql-general by date

  From Date Subject
Next Message Uros Gruber 2002-07-12 08:26:57 What is better any why
Previous Message Adrian 'Dagurashibanipal' von Bidder 2002-07-12 07:55:06 Re: Hardware for PG