Search Shortcut cmd + k | ctrl + k
v0.10.0 (stable)
DuckDB Environment

DuckDB provides a number of functions and PRAGMA options to retrieve information on the running DuckDB instance and its environment.

Version

The version() function returns the version number of DuckDB.

SELECT version();
┌───────────┐
│ version() │
│  varchar  │
├───────────┤
│ v0.10.0   │
└───────────┘

Using a PRAGMA:

PRAGMA version;
┌─────────────────┬────────────┐
│ library_version │ source_id  │
│     varchar     │  varchar   │
├─────────────────┼────────────┤
│ v0.10.0         │ 20b1486d11 │
└─────────────────┴────────────┘

Platform

The platform information consists of the operating system, compiler, and, optionally, the compiler. The platform is used when installing extensions. To retrieve the platform, use the following PRAGMA:

PRAGMA platform;

On macOS, running on Apple Silicon architecture, the result is:

┌───────────┐
│ platform  │
│  varchar  │
├───────────┤
│ osx_arm64 │
└───────────┘

On Windows, running on an AMD64 architecture, the platform is windows_amd64. On CentOS 7, running on the AMD64 architecture, the platform is linux_amd64_gcc4. On Ubuntu 22.04, running on the ARM64 architecture, the platform is linux_arm64.

Extensions

To get a list of DuckDB extension and their status (e.g., loaded, installed), use the duckdb_extensions() function:

SELECT * 
FROM duckdb_extensions();

Meta Table Functions

DuckDB has the following built-in table functions to obtain metadata about available catalog objects:

About this page

Last modified: 2024-02-26