Re: binary patch problems - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: binary patch problems
Date
Msg-id alpine.BSO.2.00.1109191427540.603@leary.csoft.net
Whole thread Raw
In response to Re: binary patch problems  (Bodor Andras <bodri.mh3@gmail.com>)
List pgsql-jdbc

On Mon, 19 Sep 2011, Bodor Andras wrote:

>  For the ForceBinaryTransfers I vote for dropping it, as
> it adds unnecessary complications (and new bugs) to the
> code.

ForceBinaryTransfers doesn't just make the driver use a named protocol
level statement, so it isn't an equivalent substitution to recommend
adjusting prepareTreshold.  The key to binary transfer is knowing what
types will be returned so you know if you can handle them as binary and
therefore whether to request them as binary or not.  So the
ForceBinaryTransfers hack is for testing and does a half execution to get
the returned data types and then does a real execution with the true data
types.

So we need this to make use of our existing test suite because it doesn't
normally do multiple execution which would let us naturally discover the
type information.  Whether it should be exposed to users or not is
debatable, but we need it internally.

Unless of course you are willing to add an extra network roundtrip to
every query execution to pickup the type information before execution.

Kris Jurka



pgsql-jdbc by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: binary patch problems
Next
From: Kris Jurka
Date:
Subject: Re: jdbc and automagic casting