0

I have two postgres versions on my system. I want to check the list of database that is available on older version of postgres (port: 3433). Is there any way to check this?

Note - On running psql command it is showing the latest version of postgres that I have installed in system and \l command shows databases present in that version.

2 Answers 2

1

The simplest variant is

psql -p 3433 -l

This assumes that you are operating system user postgres.

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

Comments

0

I was able to check the list of database using the following command -

psql -h localhost -p 3433 -d test -U user

Here -h represents the host, -p represents the port, -d represents the database and -u represents the username.

After that you have to enter the password and run command \l to view the list of database.

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.