Re: [CDBI] Class::DBI opens database connection for each object?

Josh Tanski <[email protected]> Tue, 15 Apr 2008 09:42:57 -0400
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Edward J. Sabol wrote:
> Josh Tanski asked:
>> My question is what am I doing wrong - shouldn't there only be one 
>> database connection open and all db access going through that connection?
> 
> Yes, there should be one connection. That's certainly how Class::DBI works
> normally. Perhaps the problem is with DBD::PgPP? Maybe it doesn't support DBI
> connection sharing properly or maybe it doesn't finish its statement handles
> automatically.

Thanks - you are right.  Using DBD::Pg instead of DBD::PgPP solves the 
problem.  I did not realize there were multiple PostgreSQL drivers - 
although DBD::PgPP seems to be the only option for ActivePerl...

Thanks again,
Josh