Skip site navigation (1) Skip section navigation (2)

Re: Seaching without accents

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Augusto Cesar Castoldi <castoldi(at)npd(dot)ufsc(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Seaching without accents
Date: 2004-01-28 14:29:51
Message-ID: 4017C75F.8000305@oopsware.de (view raw or flat)
Thread:
Lists: pgsql-general
Augusto Cesar Castoldi wrote:

>  
> 
> SELECT * FROM test WHERE name LIKE “tes%”
> 
>  
> 
> And it should return values “tést, test”
> 

Why not using a regular expression, like this:



yomama=# select * from test;
  name
------
  test
  tést
  tèst
  tast
(4 rows)

yomama=# select * from test where name ~ '^t[eéè]s';
  name
------
  test
  tést
  tèst
(3 rows)


   Bernd


In response to

pgsql-general by date

Next:From: Daniel GaudreaultDate: 2004-01-28 14:32:56
Subject: Sorting is ignoring spaces
Previous:From: Augusto Cesar CastoldiDate: 2004-01-28 14:29:11
Subject: Re: Seaching without accents

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group