psycopg2 cursor.execute CREATE TABLE issue

Chris Angelico rosuav at gmail.com
Sun Jan 6 22:45:51 CET 2013


On Mon, Jan 7, 2013 at 8:38 AM,  <andydtaylor at gmail.com> wrote:
> But something is preventing this from working, and I don't know enough to figure it out, despite having spent most of today reading up. The code executes with no error, yet no table is created or populated.

Standard databasing requirement: You need to commit your work.

http://initd.org/psycopg/docs/connection.html#connection.commit

Otherwise, the transaction gets rolled back, and nobody sees your changes.

ChrisA



More information about the Python-list mailing list