Re: Apache::DBI and DBD::Pg

Поиск
Список
Период
Сортировка
От Tim Bunce
Тема Re: Apache::DBI and DBD::Pg
Дата
Msg-id 20060115093831.GA1196@timac.local
обсуждение исходный текст
Ответ на Re: Apache::DBI and DBD::Pg  (Jeremy Nixon <jeremy@exit109.com>)
Список pgsql-general
On Sun, Jan 15, 2006 at 02:00:15AM +0000, Jeremy Nixon wrote:
> Tyler MacDonald  <tyler@yi.org> 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Jeremy Nixon
Дата:
Сообщение: Re: Apache::DBI and DBD::Pg
Следующее
От: Zlatko Matić
Дата:
Сообщение: visual query builder for Postgres?