How to Check your psql Client Version

Here’s how to find out what version of psql you’re using.

Running the following code returns the psql version:

psql --version

Here’s the result when using version 12.1:

psql (PostgreSQL) 12.1

You can also use a shortened syntax psql -V to return the same result.

psql -V

Result:

psql (PostgreSQL) 12.1