[DB-SIG] autocommit support in pep-249

Joshua D. Drake jd at commandprompt.com
Wed Sep 14 20:00:19 CEST 2011


On 09/14/2011 10:25 AM, Michael Bayer wrote:
>
>
> On Sep 14, 2011, at 12:56 PM, Joshua D. Drake wrote:
>
>> No. What I am saying is, the begin() is optional. If you look at my example, if PostgreSQL is in autocommit mode, the only way to start a transaction is to execute a query to start the transaction (BEGIN or START TRANSACTION). From a, "it would be nice if" perspective, I would like to have the option of using .begin() to start a transaction. That seems to jive better with proper coding.
>>
>
> "proper" on postgresql sure.  On Oracle, there is no BEGIN.   I like that the DBAPI tries to simplify this disconnect with a consistent, moderately coarse-grained facade rather than confusing users and burdening DBAPI authors with two ways to do it.
>

Thus the "optional". Those that can make use of it can, those that don't 
don't need it or it will be silently ignored.

Sincerely,

Joshua D. Drake

-- 
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Support, Training, Professional Services and Development
The PostgreSQL Conference - http://www.postgresqlconference.org/
@cmdpromptinc - @postgresconf - 509-416-6579


More information about the DB-SIG mailing list