Commit: postgres on cursor and sqlite on connection
dieter
dieter at handshake.de
Tue Nov 10 01:53:56 EST 2015
Cecil Westerhof <Cecil at decebal.nl> writes:
> I have written some code I like to use with several databases. At the
> moment sqlite and postgres. It looks like with progres I can use:
> cursor.execute('COMMIT;')
> but that with sqlite I need to use:
> conn.commit()
>
> Is this true, or am I doing something wrong?
There might be differences between various database interface libraries.
I am using "psycopg" to interface with Postgres - and which it,
you can also use "conn.commit" (as with "sqlite").
More information about the Python-list
mailing list