Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.9.1/8.9.1) with ESMTP id OAA06629 for ; Fri, 8 Jan 1999 14:19:56 -0500 (EST) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id NAA04970; Fri, 8 Jan 1999 13:19:53 -0600 (CST) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (4.1) id xmaa04103; Fri, 8 Jan 99 13:19:11 -0600 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id ; Fri, 8 Jan 1999 13:21:37 -0600 Message-ID: From: "Jackson, DeJuan" To: Christophe Labouisse , pgsql-sql@postgreSQL.org Subject: RE: [SQL] Case insensitive equality operator Date: Fri, 8 Jan 1999 13:21:35 -0600 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain > -----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