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.