JDBC CTS failures
JDBC CTS failures
От:
Dave Cramer <pg@fastcrypt.com>
Дата:
There is a test case in the JDBCCTS that uses the following CallableStatement.prepareStatement( call function that does updates ) then does a number of addBatch callls and does executeBatch() This fails since executeBatch does not allow resultsets and we emulate calling a function by doing "select * from funcname()" which does return a result set. The proposal is to have CallableStatement.executeBatch ignore this resultSet instead of throwing an exception. Can anyone see any problems with this ? Dave
Re: JDBC CTS failures
От:
Kris Jurka <books@ejurka.com>
Дата:
On Thu, 19 Oct 2006, Dave Cramer wrote: > CallableStatement.prepareStatement( call function that does updates ) > then does a number of addBatch callls > and does executeBatch() > > This fails since executeBatch does not allow resultsets and we emulate > calling a function by doing "select * from funcname()" which does return a > result set. > > The proposal is to have CallableStatement.executeBatch ignore this resultSet > instead of throwing an exception. > > Can anyone see any problems with this ? > There are potential problems if you pass large parameters to the function and it returns large values. See the comments around org.postgresql.core.v3.QueryExecutorImpl.MAX_BUFFERED_QUERIES. Despite the potential problems I think we should implement this solution because we've gotten this complaint reasonably often and the errors should be rare (although unfortunately difficult to diagnose). Kris Jurka