pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Case insensitive equality operator
2+ messages / 2 participants
[nested] [flat]

* Case insensitive equality operator
@ 1999-01-07 22:25 Christophe Labouisse <labouiss@club-internet.fr>
  0 siblings, 0 replies; 2+ messages in thread

From: Christophe Labouisse @ 1999-01-07 22:25 UTC (permalink / raw)
  To: pgsql-sql


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
Christophe Labouisse : Cinéma, typographie, Unix
labouiss@club-internet.fr http://gabuzo.home.ml.org/
Le cinéma en Lumière : http://www.lumiere.org/

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* RE: [SQL] Case insensitive equality operator
@ 1999-01-08 19:21 Jackson, DeJuan <djackson@cpsgroup.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jackson, DeJuan @ 1999-01-08 19:21 UTC (permalink / raw)
  To: Christophe Labouisse <labouiss@club-internet.fr>; pgsql-sql



> -----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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-01-08 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-07 22:25 Case insensitive equality operator Christophe Labouisse <labouiss@club-internet.fr>
1999-01-08 19:21 RE: [SQL] Case insensitive equality operator Jackson, DeJuan <djackson@cpsgroup.com>

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