[GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
Hello all, Is it possible to prevent Postgre from aborting the transaction upon a constraint violation? Using JDBC if I catch the constraint violation and try another statement I get: /ERROR: current transaction is aborted, commands ignored until end of transaction block/ I realize that I

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
Strange indeed.  Perhaps there's some background stuff happening that messes with the results (auto VACUUM?). In my mind, however, it makes sense that it would take longer: 2 extra operations against the server (save&release). Thomas Kellerer wrote: Adam B wrote on 01.05.2

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
I'm intrigued by this solution, Johan.  It might be just the ticket!  I'll do some benchmarks when I have time in a week or so. Johan Nel wrote: Adam B wrote: Hello all, Is it possible to prevent Postgre from aborting the transaction upon a constraint violation?

Re: [GENERAL] Possible to prevent transaction abort?

2009-05-01 Thread Adam B
ps.setString(1, "number " + i); Savepoint saved = con.setSavepoint(); ps.executeUpdate(); con.releaseSavepoint(saved); } con.setAutoCommit(true); long stop = System.currentTimeMillis();