Re: DBI driver and transactions

From: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
To: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>, Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DBI driver and transactions
Date: 2003-02-03 10:27:05
Message-ID: 5.1.0.14.1.20030203182438.02cec830@mbox.jaring.my
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2003-02-03 10:36:10 Re: List online archives and spam
Previous Message will trillich 2003-02-03 10:06:59 Re: History