1

Several versions of postgresql (9.3, 9.4 and 9.5) on a server with different ports and I want to start the shell of a specific one. If I run the shell:

psql

It returns:

psql (9.5.0, server 9.3.10)
Type "help" for help.

postgres=#

I think that I just started 9.5, so until now; well done. However, when I check the version with:

select version();

It returns:

version
PostgreSQL 9.3.10 on x86_64-unknown-linux-gnu,
compiled by gcc (Ubuntu     4.8.2-19ubuntu1) 4.8.2, 64-bit

Confusing; My server is version 9.3? But it runs 9.5?

1 Answer 1

0
  • 9.5 is the version of the psql tool you are using. It get's updated at each installation of a new PostgreSQL.
  • 9.3 is the version of the DBMS you are currently connected to.

When running just psql it connects to the default port 5432 so I'm guessing the 9.3 version of PostgreSQL is on that port. Try with psql --port=X and set X to a port of different PostgreSQL daemon; you should see different versions then.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .