title: PG_Dump returning 'too many command-line arguments (first is "databasename")'
body: <p>I am trying to retrieve the schema from a production database and am using the below script:</p>
  
  <pre class="lang-none prettyprint-override"><code>#!/bin/sh
  
  ssh -f -o ExitOnForwardFailure=yes -L xxxx:domain.com:xxx servername sleep 10
  
  echo 'password'
  
  pg_dump --port xxxx --username johndoe --host localhost -W password --file schemadump.sql --schema-only --no-privileges --no-owner databasename
  </code></pre>
  
  <p>however it is returning the error</p>
  
  <blockquote>
  <pre><code>  pg_dump: too many command-line arguments (first is "databasename"). I've tried a few variations but still getting the same error. Any suggestions are welcome.
  </code></pre>
  </blockquote>