title: psql saying database does not exist but it does exist in pgadmin
body: <p>I have just installed Postgres v10.4 on Windows and created, using pgadmin, a new database called analysis. It is there, I can see it in pgadmin, and it has one table in it. However, I cannot connect to this database using psql.</p>
  
  <p><a href="https://i.stack.imgur.com/rIUzW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rIUzW.png" alt="enter image description here"></a></p>
  
  <pre><code>C:\WINDOWS\system32&gt;psql -d postgres -U postgres
  psql (10.4)
  WARNING: Console code page (850) differs from Windows code page (1252)
           8-bit characters might not work correctly. See psql reference
           page "Notes for Windows users" for details.
  Type "help" for help.
  
  postgres=# l
  postgres-# \l
                                                    List of databases
     Name    |  Owner   | Encoding |           Collate           |            Ctype            |   Access privileges
  -----------+----------+----------+-----------------------------+-----------------------------+-----------------------
   postgres  | postgres | UTF8     | English_United Kingdom.1252 | English_United Kingdom.1252 |
   template0 | postgres | UTF8     | English_United Kingdom.1252 | English_United Kingdom.1252 | =c/postgres          +
             |          |          |                             |                             | postgres=CTc/postgres
   template1 | postgres | UTF8     | English_United Kingdom.1252 | English_United Kingdom.1252 | =c/postgres          +
             |          |          |                             |                             | postgres=CTc/postgres
  (3 rows)
  
  
  postgres-# \q
  
  C:\WINDOWS\system32&gt;psql -d analysis -U postgres
  psql: FATAL:  database "analysis" does not exist
  
  C:\WINDOWS\system32&gt;
  </code></pre>
  
  <p>I don't know what I'm doing with psql, but all I've found is that I can connect to db postgres as user postgres. There's a <code>\l</code> command and it shows 3 databases (2 of which, template0 and template1) I can't even see in pgadmin.</p>
  
  <p>How can I connect to the database (analysis) that I've just created in pgadmin? Can anybody explain what user I'm logged in under in pgadmin, if it's different to 'postgres' and if it isn't, how is it that I can't see in psql what I can see in pgadmin?</p>