title: psycopg2 fails on execute many statement with syntax error
body: <p>I have data coming from <code>mongodb</code> which looks like  </p>
  
  <pre><code>data = 
  (
   {
     u'name': 'A',
     u'primary_key': 1
   },
   {
     u'name': 'B',
     u'primary_key': 2
   },
   {
     u'name': 'C',
     u'primary_key': 3
   }
  )
  </code></pre>
  
  <p>when I call the following  </p>
  
  <pre><code>cur = conn.cursor()
  cur.executemany("""INSERT INTO ddmension(id,name) VALUES (%(primary_key)s, %(name)s)""", data) 
  </code></pre>
  
  <p>it fails saying  </p>
  
  <pre><code>ProgrammingError: 'syntax error at or near """"INSERT INTO dimension (id, name) VALUES (1, E\'A\')""""\nLINE 1: """INSERT INTO dimension (id, name) VALUES (1, E\'A\n ^\n'  
  </code></pre>
  
  <p>Can someone guide me what the issue could be? I am following <a href="http://wiki.postgresql.org/wiki/Psycopg2_Tutorial" rel="nofollow">this</a> tutorial </p>
  
  <p>Thank you</p>