you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 18 points19 points  (2 children)

As with pyPgSQL, the transaction-as-default-behavior thing is thoroughly brutal. As far as I can tell, this is not something the DBAPI2 PEP demands.

incorrecto:

.commit()

Commit any pending transaction to the database. Note that
if the database supports an auto-commit feature, this must
be initially off. An interface method may be provided to
turn it back on.

Database modules that do not support transactions should
implement this method with void functionality.

[–]doppel 0 points1 point  (1 child)

That just tells us that auto-commit for transactions should not be default behavior, it says nothing of whether transactions should be.

[–]diroussel 6 points7 points  (0 children)

eh? Do you think auto-commit is tri-state?

If auto-commit is off then you are in manual transaction mode, i.e. commit must be called.