Re: DBI/DBD::Pg mem. use goes exponential

From: Vivek Khera <vivek(at)khera(dot)org>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: DBI/DBD::Pg mem. use goes exponential
Date: 2005-09-29 20:45:16
Message-ID: 455232D3-993A-4BB2-9C2B-90AE59A848F2@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 :-)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2005-09-29 20:49:00 Re: Performance woes relating to DISTINCT (I think)
Previous Message Scott Marlowe 2005-09-29 19:52:02 Re: Does copy abort on a failed insertion?