Thread: strange commit behavior

strange commit behavior

From
Flavio Palumbo
Date:
Hi all,

I'm developing a little tool in Java that manages database update throught
external text files.

In this tool there is an option that allows the user accepts a defined amount
of errors during the update and save the data well formed.

To do this I start commitment control when the process begins and, at the end
of process itself, if there are no errors or the threshold is not reached I
commit data, else rollback.

I tested this tool under MySql and Oracle and everything went as expected.

Unfortunately postgres seems to work in a different way, cause if there is an
error in the transaction (beetwen start commiment control and commit) the whole
set of updates is discarded ; no way to commit the well formed records inserted
(earlier or later).

Is this right ?

There is a way or a workaround to achieve my goal ?

Any hint would be appreciated.

Flavio