pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Christophe Labouisse <labouiss@club-internet.fr>
To: pgsql-sql@postgreSQL.org
Subject: RE: [SQL] Case insensitive equality operator
Date: Fri, 8 Jan 1999 13:21:35 -0600
Message-ID: <F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail> (raw)



> -----Original Message-----
> I'm looking for a case insensitive equality operator (something like
> ~~*). There are of course regular expression matches but I am
> reluctent to use them because I need to preprocess my string before
> using it (putting it between a ^ and a $, escaping special 
> characters) 
> and because I'm afraid that the use of regular expressions will be
> more resource demanding than a simple equality.
> 
> Any ideas ?
> 
> Cheers

Why don't you just use the upper or lower functions.
i.e. SELECT * from t1 WHERE UPPER(a)= 'BLAH';
You could even use a functional index on a
CREATE INDEX upper_a ON t1 (UPPER(a) text_ops);
	-DEJ



view thread (2+ messages)

Message-ID: <F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail>
Permalink:  ../F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail/
Also on:    postgresql.org/message-id/F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail

 · 

reply

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: djackson@cpsgroup.com, labouiss@club-internet.fr
  Subject: Re: [SQL] Case insensitive equality operator
  In-Reply-To: <F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail>
  References: <F10BB1FAF801D111829B0060971D839F5C5E5C@cpsmail>

* 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