From: | Joel Burton <jburton(at)scw(dot)org> |
---|---|
To: | tsattler(at)speakeasy(dot)net |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Queries |
Date: | 2001-05-04 20:13:47 |
Message-ID: | Pine.LNX.4.21.0105041612150.1389-100000@olympus.scw.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Fri, 4 May 2001 tsattler(at)speakeasy(dot)net wrote:
> Greetings All.
>
> I have a record on my database with a last name of 'DeFelice'.
>
> I want to be able to retrieve that record whether a user enters 'DeFelice', 'Defelice', 'defelice', or 'DEFELICE'. Is there a way I can do that? Is that what the "ilike" function does?
CREATE INDEX lname_lower ON person ( lower(lname) );
(above step is optional, but helps performance)
SELECT * FROM person WHERE lower(lname) = 'defelice'
should be faster than ILIKE.
--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Burton | 2001-05-04 21:33:19 | Re: createuser withpassword |
Previous Message | Joel Burton | 2001-05-04 19:21:18 | Re: [possibly] dumb question |