Case Insensitive Queries - Mailing list pgsql-sql

From Dan Lyke
Subject Case Insensitive Queries
Date
Msg-id 15123.54390.703981.375120@wynand.flutterby.com
Whole thread Raw
In response to Case Insensitive Queries  (Mark <mark@zserve.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Manessinger Andreas
Date:
Subject: AW: Case Insensitive Queries
Next
From: "Joe Conway"
Date:
Subject: Re: Case Insensitive Queries