Postgres compatibility

pg_duckdb is compatible with Postgres 16.

Linux (apt-based)

Pre-built pg_duckdb packages are available for Ubuntu 22.04 and 24.04 using pgxman, the Postgres exension manager. Note that pgxman requires use of the PGDG Postgres packages.

# install pgxman
curl -sfL https://install.pgx.sh | sh -
# install pg_duckdb
pgxman install --pg 16 pg_duckdb

From Source

Compiling from source has been tested on Linux and MacOS with Postgres 16.

Linux Prerequisites

apt-get install \
  build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev \
  libssl-dev libxml2-utils xsltproc pkg-config libc++-dev libc++abi-dev libglib2.0-dev \
  libtinfo5 cmake libstdc++-12-dev postgresql-server-dev-16 liblz4-dev

MacOS Prerequisites

Install Xcode and Homebrew. Then, install the required packages with:

brew install cmake postgres@16 openssl@3

Build pg_duckdb

git clone --recurse-submodules https://github.com/duckdb/pg_duckdb
cd pg_duckdb
make install

Expect building from source to take 15-30 minutes as compiling DuckDB is part of the build.