title: psycopg2 queries to remote database
body: <p>I need to get some data from remote database. Here code to connect:</p>
  
  <pre><code>import psycopg2
  
  params = {
    'dbname': 'some_db',
    'username': 'user',
    'password': 'password',
    'host': '333.333.333.333',
    'port': 3333
  }
  
  conn = psycopg2.connect(**params)
  </code></pre>
  
  <p>Then i try to execute query:</p>
  
  <pre><code>cur = conn.cursor()
  cur.execute("SELECT * FROM sometable")
  </code></pre>
  
  <p>And after that i get exception:</p>
  
  <pre><code>psycopg2.ProgrammingError: relation sometable does not exist
  </code></pre>
  
  <p>Now if i connect to database with exact same parameters from same machine via psql:</p>
  
  <pre><code>psql --dbname=some_db --username=user --password=password --host=333.333.333.333 --port=3333
  </code></pre>
  
  <p>and try to execute query:</p>
  
  <pre><code>SELECT * FROM sometable;
  </code></pre>
  
  <p>i get results without any errors. And it happens not only with one table, but with all of them in that database.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have little mistake in params. I use not</p>
  
  <pre><code>'username': 'user',
  </code></pre>
  
  <p>but:</p>
  
  <pre><code>'user': 'user',
  </code></pre>