pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Constantin Teodorescu <teo@flex.ro>
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: [INTERFACES] Case insensitive LIKE ?
Date: Sun, 31 Oct 1999 12:54:32 +0000
Message-ID: <381C3C08.DF980E4@tm.ee> (raw)
References: <381C31A8.34A17B8E@flex.ro>
	<381C37A3.EC9D5D4D@tm.ee>
	<381C3665.572E14EF@flex.ro>

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



view thread (11+ messages)  latest in thread

Message-ID: <381C3C08.DF980E4@tm.ee>
Permalink:  ../381C3C08.DF980E4@tm.ee/
Also on:    postgresql.org/message-id/381C3C08.DF980E4@tm.ee

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: hannu@tm.ee, teo@flex.ro
  Subject: Re: [INTERFACES] Case insensitive LIKE ?
  In-Reply-To: <381C3C08.DF980E4@tm.ee>

* 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