Re: [ADMIN] About lower and uppercase

From: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
To: <frbn(at)efbs-seafrigo(dot)fr>, <geek24(at)avantel(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [ADMIN] About lower and uppercase
Date: 2002-11-05 13:01:03
Message-ID: 20021105140103.0c4d6a3a.christoph.dalitz@hs-niederrhein.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Date: Tue, 05 Nov 2002 09:22:37 +0100
From: frbn <frbn(at)efbs-seafrigo(dot)fr>
>
> select * from fruits where fruit_name ~* 'orange';
>
Does this query ever use an index on fruit_name?

AFAIK the most reliant solution is the previously suggested
"where lower(fruit_name) = 'orange'"
AND creating indices only on lower(attributename).

Beware however that there are some letters that have no
uppercase/lowercase equivalent (the letter "Eszet" (ß) in German
is an example for a letter that has no uppercase equivalent).
That should not be such an issue as a proper implementation of
upper()/lower() would leave these letters alone.

Christoph Dalitz

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Dalitz 2002-11-05 13:09:33 Re: executing delete in a case statement?
Previous Message Florian Litot 2002-11-05 12:48:49 Re: log file?