Received: from mail.flutterby.com (www.flutterby.com [209.140.49.28]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4TGumE93724 for ; Tue, 29 May 2001 12:56:48 -0400 (EDT) (envelope-from danlyke@flutterby.com) Received: from wynand.flutterby.com ([63.120.70.3]) by www.flutterby.com (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0-1) with ESMTP id f4THA7uR029781 for ; Tue, 29 May 2001 10:10:08 -0700 Received: from wynand.flutterby.com (danlyke@localhost [127.0.0.1]) by localhost (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0.Beta7-1) with ESMTP id f4TGtKHw000840 for ; Tue, 29 May 2001 09:55:21 -0700 Received: (from danlyke@localhost) by wynand.flutterby.com (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0.Beta7-1) id f4TGtJOT000837; Tue, 29 May 2001 09:55:19 -0700 From: Dan Lyke MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15123.54390.703981.375120@wynand.flutterby.com> Date: Tue, 29 May 2001 09:55:18 -0700 To: pgsql-sql@postgresql.org Subject: Case Insensitive Queries In-Reply-To: <200105291603.f4TG3BW08512@mail.ldssingles.com> References: <200105291603.f4TG3BW08512@mail.ldssingles.com> X-Mailer: VM 6.92 under Emacs 20.7.2 X-Archive-Number: 200105/311 X-Sequence-Number: 3152 Mark writes: > Is it possible to execute a query using a where clause that allows case > insensitive comparison between a field and text. select * from account where upper(username) = upper('test') (Upper used because, as has been remarked on this list and in other places, folding from richer character sets is likely to get better matches this way). And yes, you can create an index on upper(fieldname). Dan