Using an installed module/extension
In this recipe, we will explain how to enable an installed module so that it can be used in a particular database. The additional types, functions, and so on will exist only in those databases where we have carried out this step.
As we mentioned in the previous recipe, Adding an external module to PostgreSQL, specially packaged modules are called extensions in PostgreSQL. They can be managed with dedicated SQL commands.
Getting ready
The pg_available_extensions
system view shows one row for each extension that can be installed. All you need to know is the extension name.
How to do it…
Each extension has a unique name, so it is just a matter of issuing the following command:
CREATE EXTENSION myextname;
This will automatically create all required objects inside the current database.
For security reasons, you need to do this as a database superuser. For instance, if...