Search Postgresql Archives

Re: Apache::DBI and DBD::Pg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 15, 2006 at 02:00:15AM +0000, Jeremy Nixon wrote:
> Tyler MacDonald  <tyler@xxxxxx> wrote:
> 
> > [Fri Jan 13 23:46:28 2006] [error] [client 192.168.99.112] DBD::Pg::db
> > prepare_cached failed: FATAL: terminating connection due to administrator
> 
> Here's the thing: if your database connection goes away, and Apache::DBI
> opens a new one, any prepared statement handles you might have become
> invalid, because prepared statements are per-connection.
> 
> My way around it is to not use prepared statements.

Another, better, way is to use prepare_cached() along with connect_cached().

http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/sld029.htm and later slides.

Tim.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux