Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vamyv-00034e-Vv for pgsql-jdbc@arkaria.postgresql.org; Mon, 28 Oct 2013 13:35:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vamyv-0000FC-AL for pgsql-jdbc@arkaria.postgresql.org; Mon, 28 Oct 2013 13:35:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vamyt-0000F3-9P for pgsql-jdbc@postgresql.org; Mon, 28 Oct 2013 13:35:43 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vamyp-00014V-Q5 for pgsql-jdbc@postgresql.org; Mon, 28 Oct 2013 13:35:42 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Vamyo-00066m-B7 for pgsql-jdbc@postgresql.org; Mon, 28 Oct 2013 06:35:38 -0700 Date: Mon, 28 Oct 2013 06:35:38 -0700 (PDT) From: robrez To: pgsql-jdbc@postgresql.org Message-ID: <1382967338248-5776079.post@n5.nabble.com> In-Reply-To: <526DDA06.6010300@2ndquadrant.com> References: <1382657236721-5775841.post@n5.nabble.com> <526DDA06.6010300@2ndquadrant.com> Subject: Re: Inconsistent: Getting array from result set MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 2.7 (++) 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 Craig's inference that the difference in behavior after 5 usages was related to the statement threshold seems to be correct. String SELECT = "SELECT at_id, at_array, at_array::character varying as at_array_str FROM array_test WHERE at_id = ?"; PreparedStatement selectStmt = db.getConnection().prepareStatement(SELECT); PGStatement pgStmt = (PGStatement) selectStmt; pgStmt.setPrepareThreshold(50); Setting the threshold to 50 made the sql.Array.toString() method return the expected value (not null) 50 times instead of 5. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Inconsistent-Getting-array-from-result-set-tp5775841p5776079.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc