> The behaviour of a dbapi connection, without context block, is to just close 
> the communication. The fact that this results in a rollback > stems only from 
> the behaviour of the server

But that's the whole point?   A driver should _not_ (by default) alter the 
default
behaviour of the other end, IMO, without extremely good reason. There _is_ good
reason for the transaction context manager, but not for the connection context
manager or plain use.

> I think that using 'execute("INSERT....")' is already quite a conscious 
> decision of operating on the database.

I agree. But the decision is not "this IS to be in the database" (or else no 
need for
transactions) but rather "this is to be in the database IF other, perhaps not 
even
database related, things suceed".

> asking that the program to 'conn.commit()' explicitly seems an unrequested, 
> kinda ritual, final blessing.

Exactly.

> Sending an explicit ROLLBACK is an occurrence much more rare,

Exactly, and thusly easily forgotten, with possibly dire consequences
(in the case of default-commit, as opposed to default-rollback).

Karsten


Reply via email to