Installation

_$: apt-get install postgresql-contrib

It will install automatically the version packaged with the operating system.

Extensions

Available:

database=# SELECT * FROM pg_available_extensions;

Installed:

database=# SELECT * FROM pg_extension;
database=# \dx

Install an extension:

database=# CREATE EXTENSION unaccent;

Uninstall an extension:

database=# DROP EXTENSION unaccent;

Example: unaccent

_$: su - postgres
(postgres@host)_$: psql -U postgres database
database=# CREATE EXTENSION unaccent;
CREATE EXTENSION
database=# SELECT firstname,lastname FROM client WHERE unaccent(firstname) = unaccent('Encarnación');
   nombre    | apellidos
-------------+-----------
 Encarnación |
(1 row)

database=# SELECT firstname,lastname FROM client WHERE unaccent(firstname) = unaccent('Encarnacion');
   nombre    | apellidos
-------------+-----------
 Encarnación |
(1 row)