Open-Source Wikis

/

DuckDB

/

Extensions

duckdb/duckdb

Extensions

Extensions are how DuckDB grows beyond the core engine. The directory extension/ holds in-tree extensions — modules that are part of this repository and can be linked statically or shipped as .duckdb_extension files. Out-of-tree extensions (httpfs, aws, postgres scanner, iceberg, delta, …) live in their own repositories and are integrated through patches in .github/patches/ and the configuration in .github/config/out_of_tree_extensions.cmake.

Extension build orchestration lives in extension/extension_build_tools.cmake and extension/extension_config.cmake. The README at extension/README.md is the authoritative guide; this page summarizes what is shipped in-tree.

In-tree extensions

Extension What it does Page
parquet Read and write Apache Parquet files. parquet
json JSON type, JSON path, read_json / read_json_auto. json
icu Time zones, locale-aware collations, calendar dates. icu
core_functions Bundled SQL function library — most aggregates, list/string/date functions, regexes. core-functions
autocomplete SQL autocomplete used by the CLI shell. autocomplete-and-others
tpch TPC-H schema + data generator. autocomplete-and-others
tpcds TPC-DS schema + data generator. autocomplete-and-others
jemalloc Optional jemalloc allocator. autocomplete-and-others
delta Delta-Lake reader (vendored sources). autocomplete-and-others
demo_capi Example C-API extension for documentation. autocomplete-and-others
loader Loader-only extension for the C-API entrypoint. autocomplete-and-others

Building extensions

# Build everything in-tree
BUILD_ALL_EXT=1 make

# Build a subset
DUCKDB_EXTENSIONS='parquet;json;icu' make

# Only the core engine
make

The set of in-tree extensions is in .github/config/in_tree_extensions.cmake.

Loading extensions

Extensions are linked statically when built as in-tree, so they are available immediately without a LOAD step. Dynamic extensions (.duckdb_extension files) are loaded via:

INSTALL parquet;        -- download + install
LOAD parquet;           -- activate

PRAGMA autoload_known_extensions = true (the default) lets DuckDB load known extensions on first use. The list of known extensions is built by scripts/generate_extensions_function.py.

How extensions extend the engine

Extensions register objects through ExtensionLoader (src/main/extension.cpp). They can add:

  • Scalar, aggregate, table, window, and pragma functions.
  • Custom LogicalTypes and casts.
  • Replacement scans (so SELECT * FROM 'data.parquet' becomes parquet_scan('data.parquet')).
  • File systems (e.g., httpfs adds an https:// FileSystem).
  • Storage extensions (alternative catalogs/transaction managers).
  • Optimizer rules.
  • Compression codecs.

Each in-tree extension has a top-level <name>_extension.cpp containing its Load function (e.g., extension/parquet/parquet_extension.cpp).

Out-of-tree extensions

The repo also tracks the build matrix of out-of-tree extensions (httpfs, aws, postgres, mysql, sqlite, iceberg, delta-tabular, spatial, …). Sources are external; integration lives in:

  • .github/config/out_of_tree_extensions.cmake — the registry.
  • .github/patches/<extension>/ — patch files applied to upstream sources.
  • scripts/sync_out_of_tree_extensions.py — tooling to update them.
  • .github/workflows/Extensions.yml — build matrix.

Out-of-tree extensions are not part of this wiki because their code lives elsewhere; see extension/README.md for pointers.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Extensions – DuckDB wiki | Factory