Re: DBI/DBD::Pg mem. use goes exponential - Mailing list pgsql-general

From Vivek Khera
Subject Re: DBI/DBD::Pg mem. use goes exponential
Date
Msg-id 455232D3-993A-4BB2-9C2B-90AE59A848F2@khera.org
Whole thread Raw
In response to Re: DBI/DBD::Pg mem. use goes exponential  (Keary Suska <hierophant@pcisys.net>)
List pgsql-general
On Sep 29, 2005, at 1:23 PM, Keary Suska wrote:

> You should always finish() every "select" statement handle, or both
> DBI and
> libpq will leak:
>
>     $sth->finish;
>
> after the closing bracket of the while() loop.
>
>

No, you don't need to call finish() if you fall off the end of a
while $sth->fetchrow() loop.  DBI already knows you're done with it.
You only call finish if you break out of the loop.  Ask Tim.  He told
me personally :-)


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Does copy abort on a failed insertion?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Performance woes relating to DISTINCT (I think)