Parameter · Preset Options
server_version
Shows the server version.
- Default:
18.6 (Ubuntu 18.6-1.pgdg24.04+2) - Type: string
- Applies: Read-only
In plain words
The version of the running server, for example 18.6. Packagers may add details in parentheses. Clients receive it automatically when they connect.
For DBAs and operators
Major version 18, minor (bug-fix) release 6. Minor releases are binary-compatible and should be applied promptly (restart only); major upgrades need pg_upgrade or dump/restore. Sent to clients at connection start (GUC_REPORT), so drivers know the version without a query. For scripts, compare server_version_num instead of parsing this string. SELECT version() adds the platform and compiler.
How to change it
Fixed when PostgreSQL was built or the cluster was initialised. You can only read it.