Re: [GENERAL] Case insensitive "contains" search

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: "Wim Ceulemans" <wim(dot)ceulemans(at)pophost(dot)eunet(dot)be>, <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Case insensitive "contains" search
Date: 1998-11-09 09:59:41
Message-ID: l03110702b26c6c46030e@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 11:30 +0200 on 9/11/98, Wim Ceulemans wrote:

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

Are you quite sure about that? That it finds a string in which there is no
'test' even as part of the word? Because that would indicate a bug in the
regexp algorithm, and it certainly doesn't happen in my version of Postgres
(6.2.1):

testing=> select * from test2;
t
---------------------------------------------------------------
Once upon a midnight dreary
Whether tempter sent or whether tempest tossed thee here ashore
This is a mere test line
Survival of the fittest is the Jungle Law.
Testimony does not contain it in case-sensitive.

(6 rows)

testing=> select * from test2 where t ~* 'test';
t
------------------------------------------------
This is a mere test line
Survival of the fittest is the Jungle Law.
Testimony does not contain it in case-sensitive.
(3 rows)

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Meyer 1998-11-09 10:20:30 6.5 and FreeBSD 3.0-RELEASE?
Previous Message Wim Ceulemans 1998-11-09 09:30:20 Case insensitive "contains" search