pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: till toenges <tt@kyon.de>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: statement caching proof of concept
Date: Tue, 20 Jun 2006 02:07:11 +0200
Message-ID: <44973C2F.5090701@kyon.de> (raw)
In-Reply-To: <BCA6670E-411A-40B0-9331-51EDC6B7A44E@fastcrypt.com>
References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com>
	<44973024.4010204@opencloud.com>
	<BCA6670E-411A-40B0-9331-51EDC6B7A44E@fastcrypt.com>

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



view thread (18+ messages)  latest in thread

Message-ID: <44973C2F.5090701@kyon.de>
Permalink:  ../44973C2F.5090701@kyon.de/
Also on:    postgresql.org/message-id/44973C2F.5090701@kyon.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tt@kyon.de, pg@fastcrypt.com, oliver@opencloud.com
  Subject: Re: statement caching proof of concept
  In-Reply-To: <44973C2F.5090701@kyon.de>
  References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> <44973024.4010204@opencloud.com> <BCA6670E-411A-40B0-9331-51EDC6B7A44E@fastcrypt.com> <44973C2F.5090701@kyon.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox