<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>
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.
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
duckdb
is the binary for the DuckDB shell with the extension code automatically loaded.unittest
is the test runner of DuckDB. Again, the extension is already linked into the binary.duckpgq.duckdb_extension
is the loadable binary as it would be distributed.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 🐥 │
└───────────────────┘