Re: Problem with executeBatch and "A result was returned when none was expected"

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Problem with executeBatch and "A result was returned when none was expected"
Дата
Msg-id AANLkTikb2O676Sv7TEqOB0bNYrrXP-z+4a4J8Aj66X6z@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problem with executeBatch and "A result was returned when none was expected"  (Lew <noone@lewscanon.com>)
Ответы Re: Problem with executeBatch and "A result was returned when none was expected"  (Sean Bowman <pico303@gmail.com>)
Список pgsql-jdbc
On 19 March 2011 11:49, Lew <noone@lewscanon.com> wrote:

> Sean Bowman wrote:
>>
>> Thanks for the quick response.  I'll switch it around to execute() each
>> prepared statement individually, and accumulate the generated ID's [sic].
>
> Why don't you try it batched without the RETURNING clause, and use
> 'getGeneratedKeys()' as the docs suggest?

There *is* no RETURNING clause in the application's original query
(see the code in the OP), that clause is being added by the driver to
implement Statement.RETURN_GENERATED_KEYS.

Merely requesting generated keys shouldn't really make executeBatch()
explode like this - the app is executing bare INSERTs as far as it
knows. We could definitely do better here.

Oliver

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Lew
Дата:
Сообщение: Re: Problem with executeBatch and "A result was returned when none was expected"
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Problem with executeBatch and "A result was returned when none was expected"