Received: from hu.tm.ee (isdn-54.uninet.ee [194.204.0.118]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA50457 for ; Sun, 31 Oct 1999 06:44:33 -0500 (EST) (envelope-from hannu@tm.ee) Received: from tm.ee (localhost [127.0.0.1]) by hu.tm.ee (Postfix) with ESMTP id F38863E77; Sun, 31 Oct 1999 14:54:35 +0200 (EET) Sender: hannu@hu.tm.ee Message-ID: <381C3C08.DF980E4@tm.ee> Date: Sun, 31 Oct 1999 12:54:32 +0000 From: Hannu Krosing Organization: Trust-O-Matic =?iso-8859-1?Q?O=DC?= X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-7mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Constantin Teodorescu Cc: PostgreSQL Interfaces Subject: Re: [INTERFACES] Case insensitive LIKE ? References: <381C31A8.34A17B8E@flex.ro> <381C37A3.EC9D5D4D@tm.ee> <381C3665.572E14EF@flex.ro> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Constantin Teodorescu wrote: > > Hannu Krosing wrote: > > > > Constantin Teodorescu wrote: > > > > > > Is there for PostgreSQL a modifier(parameter) that will make the LIKE > > > clause case insensitive ? > > > > Maybe > > > > select * from t where lower(name) like 'john%'; > > Yes, it may work, but probably lower(name) won't work on ODBC->MS Access > ... It is much more likely to work than ~* , the case-insensitive regex op. But to make it use indexes (for the exact case above) you should also create index on lower(name). > I would like to preserve also the SQL commands betwen versions and not > to fill my program with IF's .. I doubt that case-insensitive like is in any standard. Could someone look it up in SQL92 spec ? ------------ Hannu