From: Dan Lyke <danlyke@flutterby.com>
To: pgsql-sql@postgresql.org
Subject: Case Insensitive Queries
Date: Tue, 29 May 2001 09:55:18 -0700
Message-ID: <15123.54390.703981.375120@wynand.flutterby.com> (raw)
In-Reply-To: <200105291603.f4TG3BW08512@mail.ldssingles.com>
References: <200105291603.f4TG3BW08512@mail.ldssingles.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: danlyke@flutterby.com
Subject: Re: Case Insensitive Queries
In-Reply-To: <15123.54390.703981.375120@wynand.flutterby.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox