title: How do I specify a password to 'psql' non-interactively?
body: <p>I am trying to automate database creation process with a shell script and one thing I've hit a road block with passing a password to <a href="https://en.wikipedia.org/wiki/PostgreSQL#Database_administration" rel="noreferrer">psql</a>.
  Here is a bit of code from the shell script:</p>
  
  <pre><code>psql -U $DB_USER -h localhost -c"$DB_RECREATE_SQL"
  </code></pre>
  
  <p>How do I pass a password to <code>psql</code> in a non-interactive way?</p>