1

When I execute in terminal

psql -V

It outputs:

psql (PostgreSQL) 13.2 (Ubuntu 13.2-1.pgdg18.04+1)  

When I execute in psql prompt

SELECT version();

It outputs:

PostgreSQL 11.11 (Ubuntu 11.11-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit

What does it mean? Why there is different version? Which is the actual version? How do I make sure both have same version?

1 Answer 1

3

psql -v gives you the version of the (client side) command line tool (running on your computer).

select version(); gives your the version of the server you are connected to.

Your output means you are using psql 13 to connect to a database server running PostgreSQL 11.

If you want both to be the same version you either need to downgrade your local installation or upgrade the server to 13 (which is what I would do)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.