Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 68E31475FDE for ; Tue, 5 Nov 2002 03:20:55 -0500 (EST) Received: from mailhost.efbs-seafrigo.fr (unknown [217.167.38.10]) by postgresql.org (Postfix) with ESMTP id AE041475FD4 for ; Tue, 5 Nov 2002 03:20:54 -0500 (EST) Received: from efbs-seafrigo.fr (frbn.efbs-seafrigo.fr [192.168.84.98]) by mailhost.efbs-seafrigo.fr (Postfix) with ESMTP id 20C769BF; Tue, 5 Nov 2002 09:19:21 +0100 (CET) Message-ID: <3DC77FCD.1080406@efbs-seafrigo.fr> Date: Tue, 05 Nov 2002 09:22:37 +0100 From: frbn Organization: efbs-seafrigo User-Agent: Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Sonia_S=E1nchez_D=EDaz?= Cc: pgsql Subject: Re: [ADMIN] About lower and uppercase References: <20021104214740.U19332-100000@megazone23.bigpanda.com> X-Enigmail-Version: 0.62.4.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/149 X-Sequence-Number: 32570 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.