On Sat, 25 Dec 2004, David Brown wrote:

> You're right, in the case of standalone Perl or Apache::DBI. However, if 
> DBD::Pg happens to grab an already-open connection that doesn't have a 
> one-to-one correspondence with a $dbh (e.g. from a Postgres connection pool, 
> or from an external pooling server like DBBalancer[1]), the state of the 
> connection (with respect to past PREPAREs) isn't known.

I'm not clear why the pooling case is different.  Speaking from the JDBC 
side (which does connection pooling, but not statement pooling) there is 
a proxy connection object which wraps a real connection.  So each new 
connection from the pool gets a new proxy object, but the real underlying 
connection stays the same.  So the real connection will know what it has 
or has not prepared.  So I don't see why, simply because it's in a pool, 
that it forgets what's been prepared.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to