Skip to main content

SereneDB Environment

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

Version​

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

SQL
SELECT version() AS version;
 version
------------------------------------
 PostgreSQL 18.3 (SereneDB 26.06.0)

Using a PRAGMA:

SQL
PRAGMA version;
 library_version | source_id                                | codename
-----------------+------------------------------------------+----------
 26.11.0         | 3f9c2a7d41b0e8c56d2f1a9b7e4c3d2a1f0e9b8c | NULL

Build​

serenedb --version prints the release and the commit the binary was built from, such as serenedb (SereneDB) 26.11.0 (3f9c2a7d41b0e8c56d2f1a9b7e4c3d2a1f0e9b8c); serened --version prints the same line naming serened. The commit ends in -dirty when the source the binary was built from differed from it.

The pg_config view, which superusers can read, lists the same and how the server was built: the compilers, their flags and the CMake options of the build. The system table compatibility page lists its rows.

SQL
SELECT name, settingFROM pg_configWHERE name LIKE 'SDB%'ORDER BY name;
 name        | setting
-------------+------------------------------------------
 SDB_COMMIT  | 3f9c2a7d41b0e8c56d2f1a9b7e4c3d2a1f0e9b8c
 SDB_VERSION | 26.11.0

Server Flags​

The sdb_flags table lists the command-line flags of the server, those serenedb server --help prints, in the columns of pg_settings: setting is the value the server runs with, boot_val the default, and context is always postmaster, since a flag changes only when the server restarts. The values of auth_api_key and auth_bearer_token show as ***. SQL settings, the ones SET changes, are in pg_settings and sdb_settings().

Platform​

The platform information consists of the operating system, system architecture, and, optionally, the compiler. To retrieve the platform, use the following PRAGMA:

SQL
PRAGMA platform;
 platform
-------------
 linux_amd64

The platform string combines the operating system and architecture — for example osx_arm64 on macOS with Apple Silicon, windows_amd64 on Windows on AMD64, or linux_arm64 on Ubuntu Linux on ARM64.

Licenses and Contributors​

The sdb_licenses table lists SereneDB and the third-party libraries the server was built with: each one's name, its license as an SPDX expression, its home page, and one row per license file with the file's path in the SereneDB source tree and its text. A library without a license file has the license NOASSERTION and no file or text.

SQL
SELECT name, license, license_fileFROM sdb_licensesWHERE name IN ('DuckDB', 'Zstandard')ORDER BY name;
 name      | license                      | license_file
-----------+------------------------------+----------------------------
 DuckDB    | MIT                          | third_party/duckdb/LICENSE
 Zstandard | BSD-3-Clause OR GPL-2.0-only | third_party/zstd/LICENSE

The sdb_contributors table lists the names of the people who wrote SereneDB's commits.

SQL
SELECT count(*) AS contributorsFROM sdb_contributors;
 contributors
--------------
           19

Meta Table Functions​

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