Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKB8T-00028a-Ed for pgsql-jdbc@arkaria.postgresql.org; Mon, 25 Mar 2013 17:24:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UKB8R-0005T1-Ky for pgsql-jdbc@arkaria.postgresql.org; Mon, 25 Mar 2013 17:24:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKB8Q-0005Sv-RB for pgsql-jdbc@postgresql.org; Mon, 25 Mar 2013 17:24:38 +0000 Received: from auth-smtp.nebula.fi ([217.30.180.105]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UKB8F-0005sS-4F for pgsql-jdbc@postgresql.org; Mon, 25 Mar 2013 17:24:37 +0000 Received: from quadvadis.localdomain (cs172004.pp.htv.fi [213.243.172.4]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.8/8.13.4) with ESMTP id r2PHOPhg007029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Mar 2013 19:24:26 +0200 Message-ID: <51508849.40007@nitorcreations.com> Date: Mon, 25 Mar 2013 19:24:25 +0200 From: Mikko Tiihonen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Patch: Force Primitives References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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