psycopg2 nie wstawia danych

Muszę wstawić dane JSON z tornado do postgres, więc oto test w ten sposób:

from psycopg2 import connect

conn = connect("user='pguser' host='localhost' dbname='pgdb' password='pgpass'")
cursor = conn.cursor()

data = '[{"id":"sdf","name":"wqe","author":"vb"}]'

for row in eval(data):
  print row
  cursor.execute("""INSERT INTO books(id,name,author) VALUES('%s','%s','%s')""" % \
        (row['id'], row['name'], row['author'])
  )

>>> cursor.execute("SELECT * FROM books")
>>> cursor.fetchall()
[('sdf', 'wqe', 'vb')]
>>> 
from psycopg2 import connect

conn = connect("user='pguser' host='localhost' dbname='pgdb' password='pgpass'")
cursor = conn.cursor()

data = '[{"id":"sdf","name":"wqe","author":"vb"}]'

for row in eval(data):
  print row
  cursor.execute("""INSERT INTO books(id,name,author) VALUES('%s','%s','%s')""" % \
        (row['id'], row['name'], row['author'])
  )

>>> cursor.execute("SELECT * FROM books")
>>> cursor.fetchall()
[('sdf', 'wqe', 'vb')]
>>> 
$> psql -d pgdb -U pguser -W
Password for user pguser: 
psql (9.1.6)
Type "help" for help.

pgdb=> select * from books;
 id | name | author 
----+------+--------
(0 rows)
gt; psql -d pgdb -U pguser -W Password for user pguser: psql (9.1.6) Type "help" for help. pgdb=> select * from books; id | name | author ----+------+-------- (0 rows)

Jak widać po wykonaniuselect w powłoce Pythona jest trochę danych, ale w psql jest 0 wierszy! Co mogę zrobić źle?

Python 2.7.2+

questionAnswers(1)

yourAnswerToTheQuestion