Re: [ADMIN] About lower and uppercase

From: frbn <frbn(at)efbs-seafrigo(dot)fr>
To: Sonia Sánchez Díaz <geek24(at)avantel(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: [ADMIN] About lower and uppercase
Date: 2002-11-05 08:22:37
Message-ID: 3DC77FCD.1080406@efbs-seafrigo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

select * from fruits where fruit_name ~* 'orange';

Stephan Szabo wrote:
On Mon, 4 Nov 2002, [iso-8859-1] Sonia S?nchez D?az wrote:

>> Hi!
>>
>> I don't know if this is possible from postgresql configuration...
>>
>> I want to ignore the use of uppercase and lowercase from the data restored
>> into the DB...
>>
>> I mean, if I write a query like this:
>>
>> select * from fruits where fruit_name like 'orange';
>>
>> I could get any result where the string looks like:
>>
>> orange
>> Orange
>> ORANGE
>>
>> Is it possible???

>Not really without doing a little bit of changing
>to the query (for example using ILIKE rather than LIKE
>or lower(fruit_name) like 'orange' with an appropriate
>index on lower(fruit_name).

Theoretically, it could perhaps be possible to create a locale
which compare 'orange' and 'OraNgE' equally and then
initdb in that locale, but I've never tried it so I don't
know if it'd work.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message dima 2002-11-05 09:24:34 Re: dumping a password-protected db from a perl script or
Previous Message Stephan Szabo 2002-11-05 05:50:06 Re: About lower and uppercase

Browse pgsql-general by date

  From Date Subject
Next Message Florian Litot 2002-11-05 08:56:34 log file?
Previous Message Justin Clift 2002-11-05 07:41:36 Re: [HACKERS] PostgreSQL IRC Channel... who's the Admin?