Re: statement caching proof of concept - Mailing list pgsql-jdbc

From till toenges
Subject Re: statement caching proof of concept
Date
Msg-id 44973C2F.5090701@kyon.de
Whole thread Raw
In response to Re: statement caching proof of concept  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Dave Cramer wrote:
> No question, and I would certainly not make this the default
> behaviour. The user would have to turn on caching.

In this case the user could be expected to close() the statement after
use and not do anything with it afterwards. Therefore you can forget my
part about not knowing when it is safe to reuse the statement.

> How does the generic wrapper solve the problems above ? I would think
> they all suffer from the same problems ?

A generic wrapper would be explicitly used. The user would know how to
use it and comply with any special rules. Implicit caching has to work
with each and every existing app out there, no matter how braindead.
Much more difficult.

The middle road of optional, user configurable caching in the driver can
expect a little more from the user, like properly calling close() and
not doing anything with the statement afterwards. This would have to be
explictly stated in the documentation.


Till

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: statement caching proof of concept
Next
From: Oliver Jowett
Date:
Subject: Re: statement caching proof of concept