title: fabric postgres password in command
body: <p>I have a fabric script that dumps database on server. And I can use it on multiple servers with the PostgreSQL database. The command is simple:   </p>
  
  <pre><code>sudo("su postgres -c \"PGPASSWORD=%s pg_dump %s &gt; /tmp/telemedia_newdb\""
  % (HOST_SOURCE_DB_UPASS,HOST_SOURCE_DB))
  </code></pre>
  
  <p>But sometimes, Postgres does not ask for a password at all ... </p>
  
  <p>Will this command fail without a password prompting from Postgres? (Or I know that it will not prompt and <code>HOST_SOURCE_DB_UPASS=''</code>). I want THIS code to work with or without password.</p>