Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a basic question about PostgreSQL:
When connecting to my database server via pgadmin3, I can see that there are multiple databases. For example, let's say I can see "test", "test1", and "postgres".

From there, I can choose which database I want to connect to.

However, from the command line, I'm doing the following to connect:

psql -U adminusername

This brings me to a postgres=# prompt.

Once connected, I tried to do a \l command to see all databases, but the list I get back is different from what I see using pgadmin3.

Just wondering what I might be doing wrong.

share|improve this question

closed as off-topic by Erwin Brandstetter, Paul White, Max Vernon, RolandoMySQLDBA, Mark Storey-Smith Nov 13 '13 at 2:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Paul White, Max Vernon
If this question can be reworded to fit the rules in the help center, please edit the question.

Maybe better suited on serverfault? – Erwin Brandstetter Nov 12 '13 at 21:51
Are you sure you connect to the same DB instance? – dezso Nov 12 '13 at 22:11
possible duplicate of How do I list all databases and tables using psql? – RolandoMySQLDBA Nov 12 '13 at 23:59

Most probably you are connecting to different database clusters.
Compare host and port in your settings in pgAdmin and for psql default connection.

Read the manual here about connecting with psql.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.