title: Connect to an URI in postgres
body: <p>I'm guessing this is a pretty basic question, but I can't figure out why:</p>
  
  <pre><code>import psycopg2
  psycopg2.connect("postgresql://postgres:postgres@localhost/postgres")
  </code></pre>
  
  <p>Is giving the following error:</p>
  
  <pre><code>psycopg2.OperationalError: missing "=" after
  "postgresql://postgres:postgres@localhost/postgres" in connection info string
  </code></pre>
  
  <p>Any idea? According to <a href="http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING">the docs about connection strings</a> I believe it should work, however it only does like this:</p>
  
  <pre><code>psycopg2.connect("host=localhost user=postgres password=postgres dbname=postgres")
  </code></pre>
  
  <p>I'm using the latest psycopg2 version on Python2.7.3 on Ubuntu12.04</p>