title: PostgreSQL multiple authentication methods
body: <p>How can I set up multiple authentication methods for the same host/database/user rule?  I want to be able to log in to my postgres user using both <code>sudo -u postgres psql -U postgres</code> (without having to enter a PostgreSQL password) and <code>psql -U postgres --password</code>.  Something like the following in pg_hba.conf:</p>
  
  <pre><code>local   all             postgres                        md5
  local   all             postgres                        peer
  </code></pre>
  
  <p>I can only get one method or the other working at the same time.</p>
  
  <p>Thanks.</p>
  
  <p>(I am using PostgreSQL 9.1).</p>