Re: Inconsistent: Getting array from result set - Mailing list pgsql-jdbc

From robrez
Subject Re: Inconsistent: Getting array from result set
Date
Msg-id 1382967338248-5776079.post@n5.nabble.com
Whole thread Raw
In response to Re: Inconsistent: Getting array from result set  (Craig Ringer <craig@2ndquadrant.com>)
List 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.


pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Inconsistent: Getting array from result set
Next
From: Ivonne Lopez
Date:
Subject: behavior of PGtokenizer w/ escaped delim