Re: DBD::PostgreSQL - Mailing list pgsql-interfaces

From Tim Bunce
Subject Re: DBD::PostgreSQL
Date
Msg-id 20021118163908.GD1444@dansat.data-plan.com
Whole thread Raw
In response to Re: DBD::PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
On Mon, Nov 18, 2002 at 11:19:25AM -0500, Tom Lane wrote:
> David Wheeler <david@wheeler.net> writes:
> > On Sunday, November 17, 2002, at 10:15  PM, Tom Lane wrote:
> >> Both of these seem pretty bogus to me.  Ideally the driver should not
> >> issue a "begin" until the application issues the first command of the
> >> new transaction.  Otherwise you get into scenarios where idle
> >> connections are holding open transactions, and ain't nobody gonna be
> >> happy with that.
> 
> > Okay. I think I'll use a flag in the driver to track when it's in a 
> > transaction, and do the right thing in the begin and rollback functions.
> 
> I think someone else said that the DBD framework already includes such a
> flag ("BegunWork"?) --- if so, you should surely use that one.

BegunWork _only_ relates to the begin_work method. It's not used unless
that method is used, so it's not appropriate for your use here.

Just add a flag to the drivers private structure.

Tim.


pgsql-interfaces by date:

Previous
From: "Han"
Date:
Subject: Question about the postgresql protocol
Next
From: Tim Bunce
Date:
Subject: Re: DBD::PostgreSQL