<aside> ⚠️ Any query containing SQL/PGQ syntax requires a - at the start of the query when building the extension from the source, otherwise, you will experience a segmentation fault. This is not the case when loading the extension from DuckDB, see Loading DuckPGQ

</aside>

Installation instructions from source

git clone --recurse-submodules <https://github.com/cwida/duckpgq-extension.git>

Note that using --recurse-submodules will ensure that the correct version of DuckDB is pulled, allowing you to get started.

Building the extension

To build the extension, run the following command:

make

Or, if you have Ninja installed:

make GEN=ninja

The main binaries that will be built are:

./build/release/duckdb
./build/release/test/unittest
./build/release/extension/duckpgq/duckpgq.duckdb_extension

Running the extension

To run the extension code, start the shell by executing ./build/release/duckdb.

Once the shell is running, you can directly use the features from the extension in DuckDB. To verify that the extension is functioning correctly, execute the following query:

D select duckpgq('Jan');
┌───────────────────┐
│ duckpgq('Jan')    │
│      varchar      │
├───────────────────┤
│ Duckpgq Jan 🐥    │
└───────────────────┘