Starting from DuckDB v1.0.0, it is possible to load the DuckPGQ extension as a community extension. Please note that this version is not the latest. For instructions on loading the latest version, see Loading the latest version.

Loading the Community Version

To install and load the community version of DuckPGQ, use the following SQL commands in the DuckDB CLI or within a DuckDB connection:

-- Install the DuckPGQ extension from the community repository
INSTALL 'duckpgq' FROM 'community';

-- Load the DuckPGQ extension
LOAD 'duckpgq';

Loading the latest version

To use the latest version of DuckPGQ, you will need to enable the unsigned flag in DuckDB. This allows the installation of custom, unsigned extensions from external repositories.

CLI Instructions

To load the latest version in the DuckDB CLI:

  1. Start DuckDB with the unsigned flag:
duckdb -unsigned
  1. Run the following commands to set up the custom extension repository and load the latest DuckPGQ version:
SET custom_extension_repository = '<http://duckpgq.s3.eu-north-1.amazonaws.com>';
FORCE INSTALL 'duckpgq';
LOAD 'duckpgq'

Python Instructions

To load the latest version of DuckPGQ within a Python environment, follow these steps:

  1. Connect to DuckDB with the allow_unsigned_extensions flag enabled:
import duckdb

conn = duckdb.connect(config={"allow_unsigned_extensions": "true"})
  1. Execute the following commands to load the latest version of DuckPGQ:
conn.execute("SET custom_extension_repository = '<http://duckpgq.s3.eu-north-1.amazonaws.com>';")
conn.execute("FORCE INSTALL 'duckpgq';")
conn.execute("LOAD 'duckpgq';")

Notes