X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1D5E7474E4F for ; Fri, 14 Feb 2003 05:20:14 -0500 (EST) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by postgresql.org (Postfix) with ESMTP id 88C25474E42 for ; Fri, 14 Feb 2003 05:20:13 -0500 (EST) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 18jcx2-000Mf9-0U; Fri, 14 Feb 2003 10:20:15 +0000 Received: from localhost ([127.0.0.1] ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 18jcwr-0007fO-00; Fri, 14 Feb 2003 10:20:01 +0000 Subject: Re: uppercase = lowercase From: Oliver Elphick To: jose antonio leo Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Organization: LFIX Limited Message-Id: <1045218001.10914.122.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 14 Feb 2003 10:20:01 +0000 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/221 X-Sequence-Number: 7419 On Fri, 2003-02-14 at 08:51, jose antonio leo wrote: > How can I make selects not sensitive uppercase and lowercase characters? > This is possible modifying something of psql configuration? I take it you mean that SELECT x FROM t WHERE x = 'abc'; should also return rows where x = 'ABC' and x = 'Abc' and so on. The answer is to make your condition say what it means: SELECT x FROM t WHERE lower(x) = 'abc'. If you do this a lot, you may well want to create an index on lower(x). -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "God be merciful unto us, and bless us; and cause his face to shine upon us." Psalms 67:1