Re: prepared statements - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: prepared statements
Date
Msg-id Pine.BSO.4.64.0612121120520.19713@leary2.csoft.net
Whole thread Raw
In response to prepared statements  (Christian Dannemann <Christian@merus.co.uk>)
List 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

pgsql-jdbc by date:

Previous
From: Christian Dannemann
Date:
Subject: prepared statements
Next
From: Heikki Linnakangas
Date:
Subject: Re: prepared statements