我在一个企业环境中(运行Debian Linux),没有自己安装它。我使用Navicat或phpPgAdmin访问数据库(如果有帮助的话)。我也没有运行数据库的服务器的shell访问权。


当前回答

在shell psql.exe中执行

\! psql -V

其他回答

使用VERSION特殊变量

$psql -c "\echo :VERSION"

在撰写本文时,适用于PgAdmin的当前版本:4.16。

选择需要版本的DB服务器。 单击其中的属性选项卡 右边的窗格。

请看下面的截图:

执行命令

psql -V

在哪里

V必须大写。

对我来说

$psql
postgres=# \g
postgres=# SELECT version();
                                                       version
---------------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4.21 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.6.real (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
(1 row)

希望它能帮助到一些人

使用pgadmin4,双击Servers > server_name_here > Properties选项卡> Version:

3.5版本:

4.1、4.5版本: