title: could not determine data type of parameter $1 in python-pgsql
body: <p>I have a simple table (named test) as: </p>
  
  <pre><code>id     | integer                
  name   | character varying(100) 
  intval | integer
  </code></pre>
  
  <p>When I try to use prepare statement to update the name like this in python. (I am using python-pgsql <a href="http://pypi.python.org/pypi/python-pgsql/" rel="noreferrer">http://pypi.python.org/pypi/python-pgsql/</a>)</p>
  
  <pre><code>&gt;&gt;&gt; for i in db.execute("select * from test"): print i
  ...
  (1, 'FOO', None)
  &gt;&gt;&gt; query = "UPDATE test set name = '$1' where name = '$2'"
  &gt;&gt;&gt; cu.execute(query, "myname", "FOO")
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.7/site-packages/pgsql.py", line 119, in execute
      ret = self._source.execute(operation, params)
  ProgrammingError: ERROR:  could not determine data type of parameter $1 
  </code></pre>
  
  <p>The demo file for the module can be seen at <a href="http://sprunge.us/VgLY?python" rel="noreferrer">http://sprunge.us/VgLY?python</a>.</p>