[CDBI] Class::DBI opens database connection for each object?
mortonjt at rochester.rr.com
Tue Apr 15 14:42:57 BST 2008
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
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...
More information about the ClassDBI