From: Moray McConnachie <moray.mcconnachie@computing-services.oxford.ac.uk>
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
Date: Fri, 13 Aug 1999 08:48:06 +0100
Message-ID: <002801bee560$2e499d30$760e01a3@oucs.ox.ac.uk> (raw)
References: <003401bee4d3$42774e20$0200a8c0@mike>
<37B2E714.DB904C2B@bart.w-wa.pl>
----- 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: moray.mcconnachie@computing-services.oxford.ac.uk
Subject: Re: [SQL] Searching Text Fields - Case Sensitive?
In-Reply-To: <002801bee560$2e499d30$760e01a3@oucs.ox.ac.uk>
References: <003401bee4d3$42774e20$0200a8c0@mike> <37B2E714.DB904C2B@bart.w-wa.pl> <002801bee560$2e499d30$760e01a3@oucs.ox.ac.uk>
* 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