Search Shortcut cmd + k | ctrl + k
duckflight

Query DuckDB from PostgreSQL and Arrow Flight SQL clients, including psql, ADBC, and Airport

Maintainer(s): nicosuave

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 existing PostgreSQL and Arrow Flight SQL 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.

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

Added Functions

function_name function_type description comment examples
array_ndims macro NULL NULL  
array_remove macro NULL NULL  
array_replace macro NULL NULL  
btrim macro NULL NULL  
cardinality macro NULL NULL  
div macro NULL NULL  
duckflight_core_status table NULL NULL  
duckflight_current_database macro NULL NULL  
duckflight_current_user macro NULL NULL  
duckflight_database_oid macro NULL NULL  
duckflight_flight_serve table NULL NULL  
duckflight_pg_serve table NULL NULL  
duckflight_pg_stat_activity table_macro NULL NULL  
duckflight_pg_stat_ssl table_macro NULL NULL  
duckflight_runtime_databases table_macro NULL NULL  
duckflight_servers table NULL NULL  
duckflight_session_pid macro NULL NULL  
duckflight_stop table NULL NULL  
duckflight_visible_database macro NULL NULL  
every macro NULL NULL  
format macro NULL NULL  
initcap macro NULL NULL  
json_agg macro NULL NULL  
json_extract_path macro NULL NULL  
json_extract_path_text macro NULL NULL  
json_object_agg macro NULL NULL  
json_typeof macro NULL NULL  
jsonb_array_length macro NULL NULL  
jsonb_set macro NULL NULL  
octet_length macro NULL NULL  
pg_div macro NULL NULL  
quote_ident macro NULL NULL  
quote_literal macro NULL NULL  
quote_nullable macro NULL NULL  
to_char macro NULL NULL  
to_date macro NULL NULL  
to_json macro NULL NULL  
to_jsonb macro NULL NULL  
to_timestamp macro NULL NULL  
width_bucket macro NULL NULL  

Overloaded Functions

function_name function_type description comment examples
pg_typeof macro NULL NULL  

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.