title: pg_dump with dbname - invalid port number?
body: <p>When using the <code>dbname</code> parameter with <code>pg_dump.exe</code>, I get the following error:</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>pg_dump: [archiver (db)] connection to database "my_database" failed:
    invalid port number:
    "mypass@my_server.postgres.database.azure.com:5432/my_database"</p>
  </blockquote>
  
  <p><strong>Command:</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>pg_dump.exe --dbname=postgresql://my_user@my_server:mypass@my_server.postgres.database.azure.com:5432/my_database
  </code></pre>
  
  <p>I assume this is due to the '@' in the username. But without providing the server/host, I get this:</p>
  
  <blockquote>
    <p>pg_dump: [archiver (db)] connection to database "my_database" failed: FATAL:  Invalid Username specified. Please check the
        Username and retry connection. The Username should be in  format.
        FATAL:  Invalid Username specified. Please check the Username and retry connection. The Username should be in  format.</p>
  </blockquote>