Re: Perl & DBI/DBD::Pg confusion with finish

From: John Madden <weez(at)freelists(dot)org>
To: David Wheeler <david(at)wheeler(dot)net>, David Lynn <davidl(at)ayamba(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Perl & DBI/DBD::Pg confusion with finish
Date: 2001-03-02 14:03:24
Message-ID: 01030209032465.13156@weez
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > When using DBD::Pg through DBI, can somebody tell me if it is
> > necessary to be calling the $sth->finish routine? The DBI.pm
> > documentation states that there is no need to call it if you call
> > $sth->fetchrow_xxxref until the rows are exhausted - finish should get
> > called automatically, and $sth->{'Active'} should change to false.
>
> We've found that DBD::Pg doesn't do this. So we either have to call
> $sth->finish every time, or prepare the statement with
> $dbh->prepare_cached() and passing the active flag as true. It shouldn't
> be this way, but it is.

What are the consequences of not calling ->finish()? I have several apps
using DBD::Pg, and I don't think I've used it at all...

John

--
# John Madden weez(at)freelists(dot)org ICQ: 2EB9EA
# FreeLists, Free mailing lists for all: http://www.freelists.org
# UNIX Systems Engineer, Ivy Tech State College: http://www.ivy.tec.in.us
# Linux, Apache, Perl and C: All the best things in life are free!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Renaud Tthonnart 2001-03-02 14:16:42 libpq++ : Disconnect a DB
Previous Message Laurent 2001-03-02 14:02:09 lo_import for storing Blobs