Search Shortcut cmd + k | ctrl + k

Query DuckDB from PostgreSQL, Arrow Flight SQL, HTTP, and Quack clients

Maintainer(s): nicosuave

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.5.5 1.5.6 2.0.0 2.0.1
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL duckflight FROM community;
LOAD duckflight;

Example

-- Let PostgreSQL clients query this DuckDB database.
SELECT * FROM duckflight_pg_serve(
  '127.0.0.1:5433', '/path/to/duckflight.toml'
);

-- Let Arrow Flight SQL clients query the same database.
SELECT * FROM duckflight_flight_serve(
  '127.0.0.1:31337', '/path/to/duckflight.toml'
);

About duckflight

Use DuckDB as a database server. DuckFlight lets PostgreSQL, Arrow Flight SQL, HTTP, and Quack clients query the same live DuckDB database that loaded the extension—no export, copy, or second database required.

Connect with PostgreSQL tools such as psql, Psycopg, JDBC, and BI applications; Arrow ADBC Flight SQL clients; or another DuckDB instance through the Airport extension. Reads and writes are immediately visible to DuckDB and every connected client.

Listeners require authentication. A single duckflight.toml configures users, access tokens, and optional TLS. See the quick start and authentication guide.

HTTP returns Arrow IPC; Quack serves DuckDB's binary protocol at /quack. Both accept tokens, OIDC, or mTLS rather than PostgreSQL SCRAM users.

Server-control functions:

Function Purpose
duckflight_pg_serve(address, config_file) Starts an authenticated PostgreSQL listener; returns its protocol and bound address.
duckflight_flight_serve(address, config_file) Starts an authenticated Arrow Flight SQL listener; returns its protocol and bound address.
duckflight_http_serve(address, config_file) Starts an authenticated HTTP Arrow IPC listener; returns its protocol and bound address.
duckflight_quack_serve(address, config_file) Starts an authenticated binary Quack listener; returns its protocol and bound address.
duckflight_stop(protocol, address) Stops the specified listener and returns its status.
duckflight_servers() Lists running listeners and their bound addresses.
duckflight_core_status() Reports whether the runtime loaded, its ABI version, and status details.

The automatically detected functions below also include PostgreSQL compatibility macros and internal session/catalog helpers installed by the runtime. These support PostgreSQL queries and client metadata discovery; they are not additional server controls or a complete implementation of PostgreSQL functions. Their catalog comments describe each helper. The v1 table-function C API does not expose function-description setters, so the seven native server functions are documented above.

Added Functions

function_name function_type description comment examples
duckflight_core_status table NULL NULL  
duckflight_flight_serve table NULL NULL  
duckflight_http_serve table NULL NULL  
duckflight_pg_serve table NULL NULL  
duckflight_quack_serve table NULL NULL  
duckflight_servers table NULL NULL  
duckflight_stop table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases typed_value
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp
© 2026 DuckDB Foundation, Amsterdam NL
DuckDB Home Code of Conduct Trademark Use Blog