Re: Return Codes of BatchUpdateException in PostgreSql 9.6

Поиск
Список
Период
Сортировка
Искать
От
Tillmann Schulz
Тема
Re: Return Codes of BatchUpdateException in PostgreSql 9.6
Дата
Msg-id
1148283253.9934888.1476365049022@mail.yahoo.com
Ответ на
Список
Дерево обсуждения
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Tillmann Schulz <tillmann73@yahoo.de>
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Jeremy Whiting <jwhiting@redhat.com>
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Tillmann Schulz <tillmann73@yahoo.de>
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Jeremy Whiting <jwhiting@redhat.com>
Re: Return Codes of BatchUpdateException in PostgreSql 9.6 Tillmann Schulz <tillmann73@yahoo.de>

The docu says:
If the driver continues processing after a failure (and this is the case in my example), BatchUpdateException.getUpdateCounts will have an element for every command. 

In my case there is an element for every command but all elements contain -3 (Statement.Execute_Failed) in postgres 9.6. 

I think only the failed statmements should been marked with -3! This behaviour is new in 9.6 and seems to be a bug.


Thanks

Tillmann


>According to the doco, getUpdateCounts():-
>
>Returns:
>    an array of int containing the update counts for the updates that
>were executed successfully before this error occurred. Or, if the
>driver continues to process commands after an error, one of the
>following for every command in the batch:
>
>   1.   an update count
>   2.   Statement.SUCCESS_NO_INFO to indicate that the command executed
>successfully but the number of rows affected is unknown
>   3.   Statement.EXECUTE_FAILED to indicate that the command failed to
>execute successfully 
>
>
>I do not know if the Postgres "driver continues to process commands
>after an error" but if it does then the array should contain 10 entries
>and one would have the "Statement.EXECUTE_FAILED".
>
>Tomorrow, I'll dig a bit deeper if nobody else can explain this.
>
>HTH,
>Rob
В списке pgsql-jdbc по дате отправления
От: rob stone
Дата:
От: Jeremy Whiting
Дата:
FAQ