Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Databases»How to Check the PostgreSQL Version

    How to Check the PostgreSQL Version

    By RahulAugust 6, 20212 Mins Read

    PostgreSQL is an advanced, open-source relational database management system. It is written in C programming language and was developed at the University of California, Berkeley in 1996. Initially, version 1.0 of Postgres95 was announced on September 5, 1995. The first non-university version of PostgreSQL was provided on July 8, 1996, by Marc Fournier at Hub.org Networking Services. Which is the first version of PostgreSQL for public use.

    Advertisement

    As of today, PostgreSQL 13.3 is the latest stable version available for installation. PostgreSQL version 9.5 and lower versions are no more supported by the team.

    In this tutorial, you will learn, how to check the PostgreSQL version on your system.

    How to Find PostgreSQL Version using Command line

    Use one of the following methods to check the PostgreSQL version via the command line.

    1. Check Version with Login

      Once you login to the PostgreSQL server via terminal, The post login screen displays the PostgreSQL version you have connected to.

      psql 
      
      Output:
      psql (13.3 (Ubuntu 13.3-1.pgdg20.04+1)) Type "help" for help.
    2. The above output displays, that you are running version 13.3 of PostgreSQL server.

    3. Check Version with version() Function

      You can also execute version() function to find out the PostgreSQL version. This method can also help you to check PostgreSQL version in automation scripts.

      SELECT version();
      
      Output:
      version ------------------------------------------------------------------------------------ PostgreSQL 13.3 (Ubuntu 13.3-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (1 row)
    4. Check Version with Parameters

      Alternatively, you can also find the PostgreSQL version by the preset parameters, and you can also use this method for automatic version checks.

      SHOW server_version;
      
      Output:
      server_version ---------------------------------- 13.3 (Ubuntu 13.3-1.pgdg20.04+1) (1 row)

    Check the below screenshot for all commands in action to check the Postgres version on command line.

    Find PostgreSQL Version

    How to Find Postgres Version in pgAdmin4

    pgAdmin4 is an excellent web interface for managing the PostgreSQL servers. So the pgAdmin4 users can also find the Postgres version on the web interface.

    To get the version, follow:

    1. Login to pgAdmin4
    2. In the left sidebar, expand the Servers and select your Postgres server
    3. Go to Properties tab
    4. Under the General section, check for PostgreSQL version.

    Check Postgres Version in PgAdmin4

    Conclusion

    In this tutorial, you have learned 3 methods to check the PostgreSQL version via the command line. Also provided the steps to find version in pgAdmin4.

    database postgres PostgreSQL psql version
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Securing MySQL Database with Limited User Permissions

    How to Install and Secure MongoDB on Ubuntu 22.04

    How to Install Postgres on MacOS

    How To Install PostgreSQL on MacOS

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to List Manually Installed Packages in Ubuntu & Debian
    • 10 Bash Tricks Every Developer Should Know
    • How to Validate Email Address in JavaScript
    • Firewalld: Common Firewall Rules and Commands
    • 12 Apk Commands in Alpine Linux Package Management
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.