Company
Date Published
Author
Franck Pachot
Word count
946
Language
English
Hacker News points
None

Summary

Here's a neutral and interesting summary of the text in one paragraph: To determine which version of PostgreSQL you are running, you can use the `server_version` parameter by executing the command `\c psql (13.7, server 15.1 (Debian 15.1-1.pgdg110+1)) postgres=# show server_version;`. This will display a string that includes the major and minor version numbers of PostgreSQL, as well as additional information about the build. However, parsing this string can be tricky, especially for PostgreSQL-compatible databases like YugabyteDB, which may have different versions and formats. A more straightforward approach is to use the `server_version_num` parameter, which provides a numeric representation of the major and minor version numbers. Additionally, some databases like Amazon Aurora with PostgreSQL compatibility may require additional queries to determine their actual version. It's also essential to consider the differences between PostgreSQL-compatible databases and the real PostgreSQL software, as well as the implications for security audits and feature availability.