PostgreSQL – Check Your PostgreSQL Version

Operating System: Gentoo Linux

To check your PostgreSQL version, simple enter the login to psql
psql -U <username> -d <dbname>

Linux ~ # psql -U kit -d kit_db
Password for user kit:
Welcome to psql 8.2.6, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

kit2=> select version();
                                                    version
----------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.2.6 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2)
(1 row)

kit=>

The version is shown in the welcome statement. You can also find more details by entering select version();

Done =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.