Re: prepared statements

From: Kris Jurka <books(at)ejurka(dot)com>
To: Christian Dannemann <Christian(at)merus(dot)co(dot)uk>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: prepared statements
Date: 2006-12-12 16:26:06
Message-ID: Pine.BSO.4.64.0612121120520.19713@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 12 Dec 2006, Christian Dannemann wrote:

> We are currently experimenting with a postgresql cluster database (pgcluster
> 1.5rc11).
>
> The cluster replicates all prepared statements across all database
> servers (which makes sense if they are for updates and inserts). It also
> does this for normal select statements.

Seems like your complaint is really with pgcluster, not the JDBC driver.

> Now it appears that this driver issues ANY statement as a prepared
> statement. I've tried to switch this off but to no avail. This is a huge
> nightmare and I don't quite understand why it is deemed necessary to
> issue every simple select statement as a prepared statement.
>

Using the extended query protocol makes more features available to us at
little to no cost. The ability to send bytea data in binary form,
the ability to implement ParameterMetaData, Mikko's recent work on
receiving data in binary form, and so on. If you want to disable all of
this you can add on ?protocolVersion=2 to your JDBC URL, but again I think
your complain should be to the pgcluster people.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2006-12-12 16:40:45 Re: prepared statements
Previous Message Christian Dannemann 2006-12-12 15:08:37 prepared statements