scribase
Text search and indexingversion 1.1

unaccent

Remove accents from text for search.

What it is for

unaccent is a text search dictionary and a function that strips diacritics, so a search for "creme brulee" finds "Crème brûlée". Use it in full-text search configurations or when normalizing names for matching.

Enable it

sql
create extension if not exists unaccent with schema extensions;

Example

sql
select unaccent('Crème brûlée');   -- Creme brulee

select name from dishes
where unaccent(lower(name)) like unaccent(lower('%creme%'));

Notes

  • unaccent() is not marked IMMUTABLE, so to index it wrap it in your own immutable function that names the dictionary explicitly.

Questions

How do I enable unaccent?

Run create extension if not exists unaccent with schema extensions; in the SQL editor, or switch it on from the Extensions page in the console. You do not need superuser access.

Which version of unaccent is installed?

1.1, on Postgres 17.6, as read from the running engine on 2026-10-08. Check yours with: select extversion from pg_extension where extname = 'unaccent';

Upstream project: www.postgresql.org/docs/17/unaccent.html

More text search and indexing extensions

  • pg_trgm Fuzzy text search and fast LIKE and ILIKE with trigram indexes.
  • fuzzystrmatch Soundex, Metaphone and Levenshtein distance.
  • btree_gin GIN indexes over plain columns, for mixed indexes.
  • btree_gist GiST indexes over plain columns, for exclusion constraints.