Creating extensions in PostgreSQL
In this article, we will see how to create an extension in PostgreSQL.
PostgreSQL is structured - builded to be easily extensible. Extensions loaded into the database can function like features that are built in. The contrib/ directory came with the source code contains several extensions. Other extensions are developed independently, for example PostGIS. Further, PostgreSQL replication solutions can be developed externally. For example, Slony-I is a popular master/standby replication solution that is developed externally from the core project.
Lets see how to create extension in PostgreSQL.
SELECT * FROM pg_available_extensions WHERE name = 'pg_stat_statements';
CREATE EXTENSION pg_stat_statements;
SELECT * FROM pg_stat_statements;
Lets see Create Extensions in PostgreSQL example .
In above example, we listed all available extensions in our postgreSQL instance.