Install Extension Modules PostgreSQL

Modul ekstensi pada PostgreSQL kerap diperlukan ketika membangun website atau aplikasi. Contohnya seperti ekstensi seperti tablefunc, pgcrypto dan lainnya tidak langsung aktif ketika pertama kali menginstal PostgreSQL dan perlu menginstall package postgresql-contrib.

Untuk menginstal postgresql-contrib.

yum -y install postgresql-contrib

Selanjutnya akses database dengan akun Superuser seperti postgres

psql -U postgres -d application_db

Untuk mengaktifkan ekstensi tablefunc dan pgcrypto gunakan perintah.

CREATE EXTENSION pgcrypto;
CREATE EXTENSION tablefunc;

Untuk melihat ekstensi yang terinstal di database.

application_db=# \dx
                                 List of installed extensions
   Name    | Version |   Schema   |                        Description
-----------+---------+------------+------------------------------------------------------------
 pgcrypto  | 1.0     | public     | cryptographic functions
 plpgsql   | 1.0     | pg_catalog | PL/pgSQL procedural language
 tablefunc | 1.0     | public     | functions that manipulate whole tables, including crosstab
(3 rows)