Re: JDBC behaviour

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: JDBC behaviour
Дата
Msg-id CADK3HHKf+mwzr+N8gPj1-CNi2ohyVcf3fuNgtpBHpEOeUnFB6A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JDBC behaviour  (Mark Rotteveel <mark@lawinegevaar.nl>)
Ответы Re: JDBC behaviour  (Mark Rotteveel <mark@lawinegevaar.nl>)
Список pgsql-jdbc
On 18 February 2016 at 07:09, Mark Rotteveel <mark@lawinegevaar.nl> wrote:
On Thu, 18 Feb 2016 11:59:50 +0100 (CET), Andreas Joseph Krogh
<andreas@visena.com> wrote:
> På torsdag 18. februar 2016 kl. 11:43:36, skrev Sridhar N Bamandlapally
<
> sridhar.bn1@gmail.com <mailto:sridhar.bn1@gmail.com>>:
> The code/framework is written to handle batch inserts, which is common
for
> all
> databases 
> I feel, PostgreSQL JDBC may need to modify setAutoCommit(false) code to
> "implicit savepoint - on error - rollback to savepoint"
>
>  
> You simply cannot have batch-inserts in the same transaction and
expecting
> the
> batch not to fail if one of the statements in the batch fails.

On a lot of other database systems, that is exactly how it works. If a
statement fails, that one statement is backed out (rolled back), and it is
still up to the user to decide if he wants to commit or rollback the
statements that did succeed.

This behaviour is an artifact of PostgreSQL. If you want to change the transaction semantics of PostgreSQL then pgsql-hackers is the place to take this up.

JDBC is just an interface. We aren't going to rewrite the backend semantics to meet everyones needs/wants.


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

Предыдущее
От: Mark Rotteveel
Дата:
Сообщение: Re: JDBC behaviour
Следующее
От: Mark Rotteveel
Дата:
Сообщение: Re: JDBC behaviour