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.
SELECT version() AS version;version ------------------------------------ PostgreSQL 18.3 (SereneDB 26.06.0)
Using a PRAGMA:
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.
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:
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.
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.
SELECT count(*) AS contributorsFROM sdb_contributors; contributors
--------------
19Meta Table Functions
SereneDB has the following built-in table functions to obtain metadata about available catalog objects:
sdb_columns(): columnssdb_constraints(): constraintssdb_databases(): lists the databases that are accessible from within the current SereneDB processsdb_dependencies(): dependencies between objectssdb_functions(): functionssdb_indexes(): secondary indexessdb_keywords(): SereneDB's keywords and reserved wordssdb_optimizers(): the available optimization rules in the SereneDB instancesdb_schemas(): schemassdb_sequences(): sequencessdb_settings(): settingssdb_tables(): base tablessdb_temporary_files(): the temporary files SereneDB has written to disk, to offload data from memorysdb_types(): data typessdb_views(): views