15.3. Configuring Automatic Loading of a DuckDB Extension (duckdb.autoload_extension) #

By default, DuckDB extensions installed via the duckdb.install_extension stored procedure are loaded automatically into every session that uses pgpro_axe. The duckdb.autoload_extension stored procedure allows you to change this behavior.

Required privileges: Postgres Pro AXE administrator only. For a full list of stored procedures and privileges, refer to Section 12.1.

Execute the following command on the Postgres Pro AXE server:

  SELECT duckdb.autoload_extension(extension_name, automatic_load) ON CONFLICT DO NOTHING;

Where:

  • extension_name: The name of the installed DuckDB extension.

  • automatic_load: Specifies whether the DuckDB extension must be automatically loaded into new sessions.

    Possible values:

    • true

    • false

    Default value: true.

Postgres Pro AXE updates the automatic loading configuration of the specified DuckDB extension.

Example 15.3. Executing the duckdb.autoload_extension Stored Procedure

Disabling automatic loading of a DuckDB extension:

  SELECT duckdb.autoload_extension('iceberg', false) ON CONFLICT DO NOTHING;

Enabling automatic loading of a DuckDB extension:

  SELECT duckdb.autoload_extension('iceberg', true) ON CONFLICT DO NOTHING;