[HACKERS] unaccent

2002-09-18 Thread nngodinh
Greetings, As far as I use the txtidx data structure in conjunction with gist indexing to make a word indexing of a very large UNICODE db, I've implemented a PostgreSQL function that uses libunac to unaccent TEXT fileds. The resulting text is in UTF-8, but you can modify it in the sources with a

[HACKERS] strip a character from text

2002-09-18 Thread nngodinh
Greetings, Does anyone know a function that strips ANY occurence of a given character from a TEXT? Thx. Nhan NGO DINH __ Tiscali Ricaricasa la prima prepagata per navigare in Internet a meno di un'urbana e risparmiare su tutte le

Re: [HACKERS] unaccent

2002-09-18 Thread nngodinh
The best way to use it is quite simple. If you want to index the table "titles" and "title" is the field containing the text to be indexed, you can create another unaccented field, for instance "utitle". UPDATE titles SET utitle = unac(title); Of course you can set it up as a trigger function. T

Re: [HACKERS] unaccent

2002-09-18 Thread nngodinh
Not "to_ascii", since there are so many extended UNICODE characters that doesn't have any accent and should not be converted to an ASCII character. >-- Messaggio Originale -- >Date: Wed, 18 Sep 2002 14:24:26 +0200 >From: Karel Zak <[EMAIL PROTECTED]> >To: Oleg Bartunov <[EMAIL PROTECTED]> >Cc: [E

Re: [HACKERS] strip a character from text

2002-09-18 Thread nngodinh
I'm about to write a C function... If I can't found alternatives. >-- Messaggio Originale -- >Subject: Re: [HACKERS] strip a character from text >From: Oliver Elphick <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Cc: [EMAIL PROTECTED] >Date: 18 Sep 2002 13:30:49 +0100 > > >On Wed, 2002-09-18 at 11:

Re: [HACKERS] unaccent

2002-09-18 Thread nngodinh
The txt2txtidx function works fine with unac. The problem is with the trigger: create trigger txtidxupdate before update or insert on titles for each row execute procedure tsearch(titleidx, title); As you know tsearch(titleidx, unac(title)) doesn't work. >-- Messaggio Originale -- >Date: Wed, 1