1、SQL方式
postgres=# show server_version;
server_version
----------------
12.3
(1 row)
postgres=# select version();
version
----------------------------------------------------------------------------------------------------------
PostgreSQL 12.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (NeoKylin 4.8.5-16), 64-bit
(1 row)
2、pg_config方式
[postgres@admin ~]$ pg_config|grep VERSION
VERSION = PostgreSQL 12.3
3、pg_controldata方式
[postgres@admin ~]$ pg_controldata --version
pg_controldata (PostgreSQL) 12.3
4、postgres方式
[postgres@admin ~]$ postgres --version
postgres (PostgreSQL) 12.3
|