On 10/25/2013 07:27 AM, robrez wrote:
> I am encountering inconsistent behavior when getting an array from a result
> set that was produced via a prepared statement.
>
> It seems that the first 5 times the result set is generated from a given
> statement, everything is good.
> Attempts 6-n do something strange.
By default, PgJDBC switches from client-side to server-side prepared
statements at five executions. So I'd say you're seeing an issue related
to that.
Try playing with the prepared statement threshold, see if the problem
behaviour changes along with the threshold. See the documentation for
details on that.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services