Case insensitive "contains" search

From: "Wim Ceulemans" <wim(dot)ceulemans(at)nice(dot)be>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Case insensitive "contains" search
Date: 1998-10-28 19:27:22
Message-ID: 000301be02a8$fc8aaae0$67faa8c0@aladdin.nice.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

A 'contains' search in postgreSQL is:

select * from tablex where name = '%test%';

When I want exactly the same but case insensitive, how do I do that? By
searching through the mail archive I came up with:

select * from tablex where name ~* 'test';

But this is not quite the same because it also finds for example 'tempest',
whereas the like search does not find it. So is there a postgreSQL operator
that does the same as the like %% search but case insensitive?

Regards
Wim Ceulemans
Nice bvba

Browse pgsql-general by date

  From Date Subject
Next Message Andy Lewis 1998-10-28 22:54:46 Solaris Compile problems
Previous Message Michael A. Koerber SR 1998-10-28 19:14:09 RE: [GENERAL] Creating web images from postgres data