Are you "committing" the transaction? Most DB libraries will create transactions such that any updates etc need to be explicitly committed or rolled back etc... check for a commit() method on whatever "connection" class you are using (looks like
Psycopg based on the connection.cursor() call, if so then read here:
http://initd.org/psycopg/docs/connection.html#connectionThanks for this link. I am looking at it now.