Re: [GENERAL] Accent insensitive search?

2009-03-30 Thread Stuart Bishop
On Tue, Mar 24, 2009 at 4:53 PM, Jasen Betts wrote: > On 2009-03-18, cifroes wrote: >> This is a multi-part message in MIME format. >> >> --_=_NextPart_001_01C9A7E6.B32BBA87 >> Content-Type: text/plain; >>       charset="iso-8859-1" >> Content-Transfer-Encoding: quoted-printable >> >> Hi, >>

Re: [GENERAL] Accent insensitive search?

2009-03-24 Thread Jasen Betts
On 2009-03-18, cifroes wrote: > This is a multi-part message in MIME format. > > --_=_NextPart_001_01C9A7E6.B32BBA87 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Hi, > > I have a DB in utf-8 and postgres 8.3.x.=20 > > How can I do a

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Christophe
On Mar 18, 2009, at 11:24 AM, Alvaro Herrera wrote: Hmm, if to_ascii() doesn't work, that's something worth some research. Maybe the encoding config is broken, for example. The docs say to_ascii() only works with LATIN1, LATIN2, LATIN9, and WIN1250; maybe convert('string', 'UTF-8', 'SQL_ASCI

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Alvaro Herrera
Thom Brown escribió: > Here's an example of a function I might use (although I haven't actually got > plperl installed, so can't test it myself, but you'll get the idea: > > CREATE OR REPLACE FUNCTION unaccent_string(text) RETURNS text AS $$ > my ($input_string) = @_; > $input_string =~ s/[âãäåāăą

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Oleg Bartunov
On Wed, 18 Mar 2009, cifroes wrote: Hi, I have a DB in utf-8 and postgres 8.3.x. How can I do an accent insensitive search (like ...) ? Take a look on text search capability and http://www.sai.msu.su/~megera/wiki/unaccent We have patches for CVS HEAD, but unfortunately they will likely go

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Christophe
What I've done in the past in this situation is to create a separate field with the text normalized to whatever the search form is (all lower case, accents stripped, etc.), and then index and search that from the application. Although I've not tried it, a functional index that did the same

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread John R Pierce
how about... select where translate(lower(myfield), 'âãäåāăąèééêëēĕėęěìíîïìĩīĭóôõöōŏőùúûüũūŭů', 'aaaeeooouuu') = 'stringiwannamatch'; or something like that. I may have miscounted the vowells in the 'to' string :) - Sent via pgsql-general mailing l

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Thomas Kellerer
Sam Mason wrote on 18.03.2009 18:15: On Wed, Mar 18, 2009 at 04:29:24PM -, cifroes wrote: I have a DB in utf-8 and postgres 8.3.x. How can I do an accent insensitive search (like ...) ? No good idea at the moment; I'd somehow expect to find this sort of normalization in the functionality

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Thom Brown
2009/3/18 Sam Mason > > If you can't find anything better in PG; the translate[1] function would > be my best suggestion. Performance should be better than using regular > expressions. > > Yeah, that does appear to perform better. I tried the following at it worked for me: CREATE OR REPLACE FU

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Pedro Doria Meunier
Ooops! Silly me! I should have read more carefully ... (blush) sorry! Pedro Doria Meunier GSM: +351961720188 Skype: pdoriam On Wednesday 18 March 2009 04:46:16 pm Pedro Doria Meunier wrote: > Hi, > > use ILIKE > > HTH, > > Pedro Doria Meunier > GSM: +351961720188 > Skype: pdoriam > > On Wednesday

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Sam Mason
On Wed, Mar 18, 2009 at 04:29:24PM -, cifroes wrote: > I have a DB in utf-8 and postgres 8.3.x. > > How can I do an accent insensitive search (like ...) ? No good idea at the moment; I'd somehow expect to find this sort of normalization in the functionality provided by the "text search" code

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Thom Brown
Here's an example of a function I might use (although I haven't actually got plperl installed, so can't test it myself, but you'll get the idea: CREATE OR REPLACE FUNCTION unaccent_string(text) RETURNS text AS $$ my ($input_string) = @_; $input_string =~ s/[âãäåāăą]/a; $input_string =~ s/[ÁÂÃÄÅĀĂĄ

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Thom Brown
2009/3/18 Pedro Doria Meunier > Hi, > > use ILIKE > > HTH, > ILIKE is only case-insensitive, and won't match accented characters. The only thing I can think of doing is to create a function which will replace characters with their equivalent non-accented counterparts and use that in the query.

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread cifroes
er Sent: Wed 3/18/2009 4:46 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Accent insensitive search? Hi, use ILIKE HTH, Pedro Doria Meunier GSM: +351961720188 Skype: pdoriam On Wednesday 18 March 2009 04:29:24 pm cifroes wrote: > Hi, > > I have a DB in utf-8 and postgres 8.3

Re: [GENERAL] Accent insensitive search?

2009-03-18 Thread Pedro Doria Meunier
Hi, use ILIKE HTH, Pedro Doria Meunier GSM: +351961720188 Skype: pdoriam On Wednesday 18 March 2009 04:29:24 pm cifroes wrote: > Hi, > > I have a DB in utf-8 and postgres 8.3.x. > > How can I do an accent insensitive search (like ...) ? > > > TIA signature.asc Description: This is a digital

[GENERAL] Accent insensitive search?

2009-03-18 Thread cifroes
Hi, I have a DB in utf-8 and postgres 8.3.x. How can I do an accent insensitive search (like ...) ? TIA

Re: [GENERAL] Accent-insensitive search

2007-07-13 Thread Alvaro Herrera
turbovince escribió: > Hello, I would like to perform some accent-insensitive searches on my > database, which means that a select query with condition, say, WHERE > NAME = 'HELLÔ' would return records where name is 'HELLO' as well. > > My data is encoded in Unicode (UTF8) and therefore I cannot u

Re: [GENERAL] Accent-insensitive search

2007-07-12 Thread Jorge Godoy
On Monday 09 July 2007 18:33:49 turbovince wrote: > Hello, I would like to perform some accent-insensitive searches on my > database, which means that a select query with condition, say, WHERE > NAME = 'HELLÔ' would return records where name is 'HELLO' as well. > > My data is encoded in Unicode (UT

[GENERAL] Accent-insensitive search

2007-07-12 Thread turbovince
Hello, I would like to perform some accent-insensitive searches on my database, which means that a select query with condition, say, WHERE NAME = 'HELLÔ' would return records where name is 'HELLO' as well. My data is encoded in Unicode (UTF8) and therefore I cannot use Postgre's to_ascii() trick t

Re: [GENERAL] Accent insensitive search

2007-06-22 Thread Alvaro Herrera
Diego Manilla Suárez wrote: > Hi. I have a few databases created with UNICODE encoding, and I would > like to be able to search with accent insensitivity. There's something > in Oracle (NLS_COMP, NLS_SORT) and SQL Server (don't remember) to do > this, but I found nothing in PostgreSQL, just the

Re: [GENERAL] Accent insensitive search

2007-06-21 Thread Albe Laurenz
PFC wrote: >> Hi. I have a few databases created with UNICODE encoding, and I would >> like to be able to search with accent insensitivity. There's something >> in Oracle (NLS_COMP, NLS_SORT) and SQL Server (don't remember) to do >> this, but I found nothing in PostgreSQL, just the 'to_ascii'

Re: [GENERAL] Accent insensitive search

2007-06-21 Thread Gregory Stark
"PFC" <[EMAIL PROTECTED]> writes: >> Hi. I have a few databases created with UNICODE encoding, and I would like to >> be able to search with accent insensitivity. There's something in Oracle >> (NLS_COMP, NLS_SORT) and SQL Server (don't remember) to do this, but I found >> nothing in PostgreSQL

Re: [GENERAL] Accent insensitive search

2007-06-21 Thread PFC
Hi. I have a few databases created with UNICODE encoding, and I would like to be able to search with accent insensitivity. There's something in Oracle (NLS_COMP, NLS_SORT) and SQL Server (don't remember) to do this, but I found nothing in PostgreSQL, just the 'to_ascii' function, which AF

[GENERAL] Accent insensitive search

2007-06-21 Thread Diego Manilla Suárez
Hi. I have a few databases created with UNICODE encoding, and I would like to be able to search with accent insensitivity. There's something in Oracle (NLS_COMP, NLS_SORT) and SQL Server (don't remember) to do this, but I found nothing in PostgreSQL, just the 'to_ascii' function, which AFAIK, d

Re: [GENERAL] Accent insensitive search

2003-07-01 Thread Alvaro Herrera
On Tue, Jul 01, 2003 at 03:11:54PM +, Alejandro Javier Pomeraniec wrote: > Hi ! Does anyone knows how to make accent insensitive searches?? Convert both the pattern and the column to ASCII with to_ascii > SELECT * FROM testtable WHERE testfield like '%olo%'; SELECT * FROM testtable WHERE to

Re: [GENERAL] Accent insensitive search

2003-07-01 Thread Ian Barwick
On Tuesday 01 July 2003 17:11, Alejandro Javier Pomeraniec wrote: > Hi ! Does anyone knows how to make accent insensitive searches?? > > For example > > i have this data in a table > > > Colón > Polo > > > I need that this query > > SELECT * FROM testtable WHERE testfield like '%o

[GENERAL] Accent insensitive search

2003-07-01 Thread Alejandro Javier Pomeraniec
Hi ! Does anyone knows how to make accent insensitive searches?? For example i have this data in a table Colón Polo I need that this query SELECT * FROM testtable WHERE testfield like '%olo%'; brings both results instead of only showing Polo. Thanks in advance!