Re: DBI driver and transactions - Mailing list pgsql-general

From Lincoln Yeoh
Subject Re: DBI driver and transactions
Date
Msg-id 5.1.0.14.1.20030203182438.02cec830@mbox.jaring.my
Whole thread Raw
In response to Re: DBI driver and transactions  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Responses Re: DBI driver and transactions  (greg@turnstep.com)
List pgsql-general
At 09:31 AM 2/3/03 +0000, Nigel J. Andrews wrote:

>One that did also occur to me is that I don't call finish before methods which
>have done prepare/execute and that many times I don't use a loop to retrieve
>data until one of the fetchrow_...() methods says there isn't any left. Could
>this be the cause of my problems? Somehow messing with DBI's mind and
>making it
>run out of statment handles? It does say finish or destroy handle and the
>handles should be destroyed when they drop out of scope shouldn't they?

Yep before you disconnect/quit, you're supposed to finish active
statements. e.g. prepare, execute, use up results, or call finish if you
don't need the rest of the results.

DBI by default buffers results, so if you don't call finish the buffered
results hang around, and if you just quit abruptly without tidying stuff
up, it grumbles (but still should clean up).

HTH,
Link.




pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: History
Next
From: will trillich
Date:
Subject: Re: List online archives and spam