Create extensions
APPLIES TO:
Azure Database for PostgreSQL - Flexible Server
Before creating extensions in Azure Database for PostgreSQL flexible server, you must allowlist them.
Steps to create extensions
Allowlist the extension.
If the extension requires it, also add it to
shared_load_libraries
.The user that creates the extensions must be a member of the
azure_pg_admin
role.Run the CREATE EXTENSION command to create or install a particular extension. This command loads the packaged objects into your database.
CREATE EXTENSION <extension>;
Some extensions require other extensions to be created first, because they depend on objects distributed by those other extensions. It's the case, for example, of the
pg_diskann
extension, which has dependencies on thevector
extension. To install such extensions, you can proceed in two ways:- Allowlist and run
CREATE EXTENSION
on the depending extension first. Then, allowlist and runCREATE EXTENSION
on the dependent extension.
CREATE EXTENSION <depending_extension>; CREATE EXTENSION <dependent_extension>;
- Allowlist and run
CREATE EXTENSION
on the dependent extension only, but add theCASCADE
clause, so that it automatically creates all extensions on which it depends.
CREATE EXTENSION <dependent_extension> CASCADE;
- Allowlist and run
Note
Third-party extensions offered in Azure Database for PostgreSQL flexible server are open-source licensed code. We don't offer any third-party extensions or extension versions with premium or proprietary licensing models.
Azure Database for PostgreSQL flexible server instance supports a subset of key PostgreSQL extensions, as listed in supported extensions by name or in supported extensions by version of PostgreSQL. This information is also available by running SHOW azure.extensions;
. Extensions not included in those lists aren't supported on Azure Database for PostgreSQL flexible server. You can't create or load your own extensions in Azure Database for PostgreSQL flexible server.