From: Adrian 'Dagurashibanipal' von Bidder <avbidder@fortytwo.ch>
To: pgsql-general@postgresql.org
Subject: Re: Disabling case sensitivity
Date: 12 Jul 2002 10:04:43 +0200
Message-ID: <1026461084.6775.74.camel@atlas> (raw)
In-Reply-To: <20020711092047.U63911-100000@megazone23.bigpanda.com>
References: <20020711092047.U63911-100000@megazone23.bigpanda.com>
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/gpgAttachments:
signature.asc (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: avbidder@fortytwo.ch, pgsql-general@postgresql.org
Subject: Re: Disabling case sensitivity
In-Reply-To: <1026461084.6775.74.camel@atlas>
References: <20020711092047.U63911-100000@megazone23.bigpanda.com> <1026461084.6775.74.camel@atlas>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox