Questions tagged [unaccent]
32 questions
37
votes
2 answers
Error when creating unaccent extension on PostgreSQL
I am trying to configure PostgreSQL to use fulltext search in my rails app as mentioned in this Railscast.
I am using a fresh Ubuntu 12.04 server running PostgreSQL 9.1.5 installed using apt-get with the ppa:pitti/postgresql with precise.
I get the…

fagiani
- 2,293
- 2
- 24
- 31
18
votes
5 answers
Postgres accent insensitive LIKE search in Rails 3.1 on Heroku
How can I modify a where/like condition on a search query in Rails:
find(:all, :conditions => ["lower(name) LIKE ?", "%#{search.downcase}%"])
so that the results are matched irrespective of accents? (eg métro = metro). Because I'm using utf8, I…

user1051849
- 2,307
- 5
- 26
- 43
8
votes
1 answer
unaccent() preventing index usage in Postgres
I want to retrieve a way with a given name from an OpenStreetMap database imported into PostgreSQL 9.3.5, the OS is Win7 64-bit. In order to be a bit failure tolerant, I use the unaccent extension of Postgres.
My query looks as follows:
SELECT *…

Alf Kortig
- 145
- 1
- 8
7
votes
1 answer
Cannot find PGXS for Postgresql 8.4 on Ubuntu
I am trying to install the contrib/unaccent package for Postgresql 8.4 on my Ubuntu box. But I got the error message when I typed make:
/usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
Apparently PGXS is…

user560494
- 915
- 1
- 9
- 12
6
votes
1 answer
unaccent() does not work with Greek letters in plpgsql dynamic query
I use PostgreSQL 10 and I run CREATE EXTENSION unaccent; succesfully. I have a plgsql function that contains the following
whereText := 'lower(unaccent(place.name)) LIKE lower(unaccent($1))';
later, according to what user chose, more clauses may be…

slevin
- 4,166
- 20
- 69
- 129
5
votes
1 answer
postgres unaccent function vs RoR transliterate
In our RoR project we use postgres unaccent function to retrieve unaccent version of one of our models name attribute. The name attribute can contain any accented characters from various languages. We then save it as unaccent_name attribute. I don't…

Rubow
- 51
- 1
- 4
3
votes
1 answer
BigQuery UDF to remove accents/diacritics in a string
Using this javascript code we can remove accents/diacritics in a string.
var originalText = "éàçèñ"
var result = originalText.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
console.log(result) // eacen
If we create a BigQuery UDF it does not…

Jason Tragakis
- 83
- 7
3
votes
3 answers
Postgresql levenshtein and precomposed character vs. combined character
I have Strings containing two similar looking characters. Both appear as small 'a's with an ogonek:
ą
ą
(Note: depending on the renderer they are sometimes rendered similarily, sometimes slightly differently)
However, they are different:…

Johann Gottfried
- 311
- 1
- 9
2
votes
1 answer
Use unaccent PostgreSQL function within Laravel Eloquent Query
I'm not able to use the pgsql extension unaccent while trying to retrieve records from a database.
I set up a dynamic search in my application that sends, with Ajax, what the user types in a field, and also what field was selected. I replace every…

Skery
- 57
- 1
- 8
2
votes
3 answers
Postgres UNACCENT for character with more than 1 diacritic
The UNACCENT function can strip diacritics off characters. However, in my case, it can only strip characters with 1 diacritic, for e.g.
Thành
Supermän
äää
For characters with more than 1 diacritics, UNACCENT does nothing, for e.g.
Hồ
ầ
phố
Is…

Khanetor
- 11,595
- 8
- 40
- 76
2
votes
2 answers
Ignore special characters in the WHERE clause
I have a table named artists with a record with the value 'Miró' in the name column. When I do this request:
SELECT "artists".* FROM "artists" WHERE name = 'Miró'
I have one result, so it works.
Now, when I do this request (without the special ó)…

Dougui
- 7,142
- 7
- 52
- 87
1
vote
0 answers
Why unaccent function in Postgres is a stable function? Will the precomputation in column produce the different outputs?
I am optimizing the search query in the Postgres database. The query uses the unaccent function.
I want to create a gin-index to make the search query faster. So I had gone through some articles on faking the stable function as an immutable function…

Krunal Goswami
- 11
- 2
1
vote
2 answers
Using unaccent with two different rules
German language uses diacritical characters ä, ö, ü. For international use, they are translated into ae, oe, ue (not a, o, u). This mean, that Müller is Mueller on his ID document. This is what we get, when we read the document with (for example)…

Mariusz Stefaniak
- 164
- 3
- 11
1
vote
1 answer
Unaccent() function alternative in TEIID
We have a need for accent ignoring search in our application for Europian audience.
Does TEIID offer an alternative to the function mentioned here?
TEIID doesn't recognize this function:
TEIID30068 The function 'unaccent(text)' is an unknown form.…

Martin Maťko
- 21
- 2
1
vote
1 answer
Python UDF function in Redshift always return NULL value
I want to have a function in Redshift that removes accents from words. I have found a question in SO(question) with the code in Python for making it. I have tried a few solutions, one of them being:
import unicodedata
def…

Javier Lopez Tomas
- 2,072
- 3
- 19
- 41