Hello

Following advice from this article:
https://www.oddbird.net/2014/06/14/sqlalchemy-postgres-autocommit/

and because we run large, consecutive queries, we set our transaction 
isolation level to 'autocommit' when connecting to our postgres DB. This 
means we cannot create explicit transactions and use begin() and commit():
https://www.oddbird.net/2014/06/14/sqlalchemy-postgres-autocommit/
 
This has not a problem so far because we can create another (temporary) 
connection when we do want to have a roll-backable transaction. However 
since postgres DB is set to autocommit by default, I was wondering whether 
setting the transaction isolation level to 'autocommit' was needlessly 
complicated? 

For example in the example explained here: 
the 
https://docs.sqlalchemy.org/en/14/tutorial/dbapi_transactions.html#getting-a-connection
the query will still be committed, even if don't explicitly commit the 
transaction or the transaction isolation level to 'autocommit'.

Regards
Soumaya

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/5d474102-1212-4e8e-b26e-a78815ed5829n%40googlegroups.com.

Reply via email to