How to know? Which version of PostgreSQL am I running?
How to know? Which version of PostgreSQL am I running?
25514-Jul-2023
Updated on 15-Jul-2023
Home / DeveloperSection / Forums / How to know? Which version of PostgreSQL am I running?
How to know? Which version of PostgreSQL am I running?
Aryan Kumar
15-Jul-2023Sure, there are a few ways to know which version of PostgreSQL you are running.
Using the
psql
commandOne way to check the version of PostgreSQL you are running is to use the
psql
command. Thepsql
command is a command-line tool that can be used to interact with a PostgreSQL database.To check the version of PostgreSQL you are running, open a command prompt and run the following command:
This will display the version of PostgreSQL that you are running.
Using the
pg_version
functionAnother way to check the version of PostgreSQL you are running is to use the
pg_version
function. Thepg_version
function is a function that returns the version of PostgreSQL that is running.To check the version of PostgreSQL you are running, open a PostgreSQL session and run the following command:
This will return the version of PostgreSQL that you are running.
Using the
pgAdmin
toolIf you are using the pgAdmin tool, you can check the version of PostgreSQL you are running by opening the pgAdmin tool and expanding the Servers tree.
In the Servers tree, right-click the server that you want to check the version for and select Properties. In the Properties dialog box, the version of PostgreSQL that you are running will be displayed in the Version property.