pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Patch: Force Primitives
Date: Mon, 25 Mar 2013 19:24:25 +0200
Message-ID: <51508849.40007@nitorcreations.com> (raw)
In-Reply-To: <CA+=vxNZtH+coKeFC4X6wE3vay7FsJZRYu0ZGDpaxK6O-qz9MYg@mail.gmail.com>
References: <CA+=vxNbFOFq_24NASd6abQhY8AAwWfOYLQB7mAGMXNkOSzYJQQ@mail.gmail.com>
	<CA+=vxNZtH+coKeFC4X6wE3vay7FsJZRYu0ZGDpaxK6O-qz9MYg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

On 03/25/2013 05:51 PM, Nicholas White wrote:
> I've revised the patch to make Array.getArray() return a primitive array even when using the binary transfer format. I had to add extra code to force a
> statement to do a describe query before executing (previously it would only do this if the org.postgresql.forcebinary system property was set), as the
> QueryExecutorImpl needs the Field objects to be populated when sendBind is called, or the query results will be sent back in Text format. The PrimitivesTest
> unit test my patch adds verifies that a column is being returned in the correct (text or binary) format. I think this fixes an outstanding bug; I believe binary
> transfers will only be used if the system property is set, and the binaryTransfer JDBCUrl parameter is currently useless.

By default the binary transfers for receive kick in only after the 3rd execution of a prepared statement. Do you see the binary transfers activating for array 
receives if you run your prepared statement select in a loop?

The forceBinary option is for unit tests that do not want to repeat every statement 3 times.

-Mikko


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (7+ messages)  latest in thread

Message-ID: <51508849.40007@nitorcreations.com>
Permalink:  ../51508849.40007@nitorcreations.com/
Also on:    postgresql.org/message-id/51508849.40007@nitorcreations.com

 · 

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: mikko.tiihonen@nitorcreations.com
  Subject: Re: Patch: Force Primitives
  In-Reply-To: <51508849.40007@nitorcreations.com>
  References: <CA+=vxNbFOFq_24NASd6abQhY8AAwWfOYLQB7mAGMXNkOSzYJQQ@mail.gmail.com> <CA+=vxNZtH+coKeFC4X6wE3vay7FsJZRYu0ZGDpaxK6O-qz9MYg@mail.gmail.com> <51508849.40007@nitorcreations.com>

* 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