Building DuckPGQ
Installation instructions from source
Note that using --recurse-submodules will ensure that the correct version of DuckDB is pulled, allowing you to get started. If you already cloned the repository without it, initialize the submodules with:
The duckdb submodule points to upstream duckdb/duckdb. DuckPGQ does not need a patched version of DuckDB.
Building the extension
To build the extension, run the following command:
For debug build:
Or, if you have Ninja installed:
DuckPGQ uses the DuckDB extension build system. If dependency resolution fails, install and configure vcpkg, then set VCPKG_TOOLCHAIN_PATH to your vcpkg toolchain file.
The main binaries that will be built are:
./build/<build mode>/duckdb
./build/<build mode>/test/unittest
./build/<build mode>/extension/duckpgq/duckpgq.duckdb_extension
duckdbis the binary for the DuckDB shell.unittestis the test runner of DuckDB, used to run the extension's SQL tests (see the contribution guide).duckpgq.duckdb_extensionis the loadable binary as it would be distributed.
Running the extension
Start the shell with ./build/<build mode>/duckdb -unsigned, then load the extension you built and activate the SQL/PGQ syntax:
LOAD './build/release/extension/duckpgq/duckpgq.duckdb_extension';
SET active_grammar_extensions = ['duckpgq'];
The -unsigned flag is needed because locally built extensions are not signed.