Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B4D6C4758FE for ; Fri, 6 Dec 2002 08:11:48 -0500 (EST) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by postgresql.org (Postfix) with ESMTP id 23018474E5C for ; Fri, 6 Dec 2002 08:11:48 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 18KIGd-0000RC-0U; Fri, 06 Dec 2002 13:11:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 63E7B16CDF; Fri, 6 Dec 2002 13:11:37 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id A3D8A16CDE; Fri, 6 Dec 2002 13:11:36 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: Richard Huxton Organization: Archonet Ltd To: "Pedro Igor" , Subject: Re: Case-insensitive Date: Fri, 6 Dec 2002 13:11:40 +0000 User-Agent: KMail/1.4.3 References: <000f01c29d23$b396b5d0$0b00010a@aip.com.br> In-Reply-To: <000f01c29d23$b396b5d0$0b00010a@aip.com.br> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212061311.40344.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/70 X-Sequence-Number: 10658 On Friday 06 Dec 2002 12:33 pm, Pedro Igor wrote: > Someone knows how config the postgresql for case-insensitive mode ? There isn't really a case-insensitive mode (for various reasons to do with= =20 locales AFAICT). There are various case-insensitive comparisons: ILIKE instead of LIKE etc. A very common approach is to use PG's functional indexes: SELECT * FROM foo WHERE lower(foo_col) LIKE 'blah%'; along with CREATE INDEX foo_lwr_col ON foo (lower(foo_col)); --=20 Richard Huxton