Re: Inconsistent: Getting array from result set

From: robrez <resendez(dot)java(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inconsistent: Getting array from result set
Date: 2013-10-28 13:35:38
Message-ID: 1382967338248-5776079.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ivonne Lopez 2013-10-31 15:30:20 behavior of PGtokenizer w/ escaped delim
Previous Message Craig Ringer 2013-10-28 03:29:10 Re: Inconsistent: Getting array from result set