title: Why isn't psycopg2.connect checking the password?
body: <p>I'm playing with <code>psycopg2</code> for the first time today, and I'm trying to understand how passwords work... I have a test script which drops a table, recreates the table, adds a row, and prints the row. My question is why does the <code>connect</code> command work whether or not I give it a correct password? e.g. this line:</p>
  
  <pre><code>conn = psycopg2.connect(database="mydb",host="localhost",port=5432,user="amos",
                          password="asdf")
  </code></pre>
  
  <p>and this line:</p>
  
  <pre><code>conn = psycopg2.connect(database="mydb",host="localhost",port=5432,user="amos",
                          password="asdf123")
  </code></pre>
  
  <p>unexpectedly do the same thing, and the rest of the script completes with no error. Clearly only one of those lines should work regardless of what the password actually is. As expected, I do get an error if I try a <code>user="amos123"</code>, since that user doesn't exist. If it matters, my PostgreSQL was installed with <code>Postgres.app</code>.</p>