Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe

Поиск
Список
Период
Сортировка
От David Wheeler
Тема Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe
Дата
Msg-id 15DFED4D-A169-440D-ABB0-1A1B3EEDEB82@kineticode.com
обсуждение исходный текст
Ответ на Re: 'prepare' is not quite schema-safe  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
On May 2, 2005, at 06:14 , Neil Conway wrote:

> I'm not sure I quite follow you -- in some future version of the
> backend in which prepared queries are invalidated, this would be
> invisible to the client. The client wouldn't need to explicitly
> check for the "liveness" of the prepared query, they could just
> execute it -- if necessary, the backend will re-plan the query
> before executing it.

$dbh->do("SET search_path TO one");
my $sth1 = $dbh->prepare_cached("SELECT * FROM test WHERE item = ?");
$sth1->execute("one");


$dbh->do("set search_path to two");
@{$dbh->{CachedKids}} = (); # Expire the cache!
my $sth2 = $dbh->prepare_cached("SELECT * FROM test WHERE item = ?");
$sth2->execute("two");

Regards,

David

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

Предыдущее
От: David Wheeler
Дата:
Сообщение: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe
Следующее
От: David Wheeler
Дата:
Сообщение: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe