title: Inserting strings into postgresql through pyscopg2
body: <p>I'm trying to insert some string values into a postgresql db. namely:</p>
  
  <pre>
  macaddress,
  timestamp (date time format)
  type of device (string)
  subtype (string)
  </pre>
  
  <p>example:  </p>
  
  <pre><code>INSERT INTO device (address, tstamp, type, subtype) 
       VALUES ('00:00:00:00','2012-02-22 19:31:26','computer','notebook')
  </code></pre>
  
  <p>I'm using python psycopg2 script to dump the data and the following error is appearing:</p>
  
  <pre><code>c.executemany("INSERT INTO device VALUES (default, '%s','%s','%s','%s')", 
                (mac, date, typedev, subtype,))
  TypeError: not all arguments converted during string formatting
  </code></pre>
  
  <p>the command I'm using to insert is:</p>
  
  <pre><code>c.executemany("INSERT INTO device VALUES (default, '%s','%s','%s','%s')", 
                (mac, date, typedev, subtype,))
  </code></pre>