Re: [SQL] Searching Text Fields - Case Sensitive? - Mailing list pgsql-sql

From Moray McConnachie
Subject Re: [SQL] Searching Text Fields - Case Sensitive?
Date
Msg-id 002801bee560$2e499d30$760e01a3@oucs.ox.ac.uk
Whole thread Raw
In response to Searching Text Fields - Case Sensitive?  ("Mike Field" <mike@fieldco.com>)
Responses Re: [SQL] Searching Text Fields - Case Sensitive?
List pgsql-sql
----- Original Message -----
From: Bart Ogryczak <bart@bart.w-wa.pl>
To: <pgsql-sql@postgreSQL.org>
Sent: Thursday, August 12, 1999 4:24 PM
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?


> > SELECT * FROM mydb WHERE description LIKE "%foobar%";
> > it seems to be case sensitive.  Is there a way to do it so it is NOT
> > case-sensitive?
> SELECT * FROM mydb WHERE lower(description) LIKE "%foobar%";

Brings up an interesting question. Which is faster, to use the lower/upper
functions as above (and of course
if foobar is a variable, it would also have to be made lower case by the
program calling pgsql), or to use the pattern matching case-insensitive
operator?

Yours,
Moray




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Select Maximum Question
Next
From: Bart Ogryczak
Date:
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?