Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

find Version and Release Information

In this post, I am sharing basic commands to check the PostgreSQL version information.
PostgreSQL Database Administrator can use this command to find the version number, release version name of PostgreSQL.
During the migration activities, we require to check the numeric version number instead of a full version name.
At that time, we can use below commands to get the numeric version number.
First, Get PostgreSQL Version name:
SELECT VERSION();
 
/* Sample Result:
version
--------------------------------------------------------------------------
PostgreSQL 9.5.3, compiled by Visual C++ build 1800, 32-bit
*/


Get only PostgreSQL Version:

SHOW SERVER_VERSION;
 
/*Sample Result:
server_version
-----------------------
9.5.3
*/

Get PostgreSQL Version Number:

SELECT current_setting('server_version_num');
 
/* Sample Result:
current_setting
-------------------------
90503
*/

Comments

Popular posts from this blog

PostgreSQL pgBadger

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

How to configure Replication Manager (repmgr) ?

Migrating From Oracle to PostgreSQL using ora2pg open source tools

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database