Create extensions in Azure HorizonDB

Before creating extensions in an Azure HorizonDB cluster, add them to the allow list.

Steps to create extensions

  1. Add the extension to the allow list.

  2. If the extension requires it, add its library to shared_preload_libraries and complete any required restart before creating the extension.

  3. To create untrusted extensions, you must be a member of the azure_pg_admin role. Any user with CREATE privilege can create any trusted extension listed in azure.extensions. You can retrieve this list by running SHOW azure.extensions;.

  4. Run the CREATE EXTENSION command to create or install a particular extension. This command loads the packaged objects into your database.

    CREATE EXTENSION <extension>;
    
  5. 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 the vector extension. To install such extensions, you can proceed in two ways:

    • Allow extensions in Azure HorizonDB and run CREATE EXTENSION first on the extension on which it depends. Then, add the dependent extension to the allow list and run CREATE EXTENSION on it.
    CREATE EXTENSION <depending_extension>;
    CREATE EXTENSION <dependent_extension>;
    
    • Allow extensions in Azure HorizonDB and run CREATE EXTENSION on the dependent extension only, but add the CASCADE clause, so that it automatically creates all extensions on which it depends.
    CREATE EXTENSION <dependent_extension> CASCADE;
    

Note

Third-party extensions offered for Azure HorizonDB are open-source licensed code. Microsoft doesn't offer any third-party extensions or extension versions with premium or proprietary licensing models.

Your Azure HorizonDB instance supports a subset of all existing PostgreSQL extensions, as listed in supported extensions by name or in supported extensions by version of PostgreSQL.

SHOW azure.extensions; lists the extensions currently allowlisted by your configuration. It isn't the complete supported-extension catalog and doesn't show which extensions are installed in the connected database. Use the linked catalogs to check supported extensions and pg_extension to inspect installed extensions.

You can't bring your own extensions into an Azure HorizonDB instance. Extensions not included in the lists referred to earlier aren't supported on your Azure HorizonDB instance.