Re: Problem: commit doesn´t work

From: Daniel Serodio <daniel(at)checkforte(dot)com(dot)br>
To: PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problem: commit doesn´t work
Date: 2003-01-07 14:52:24
Message-ID: 1041951144.6729.5.camel@kelly.ckf
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

While I also dislike this behaviour, it's the backend's fault, not the
driver's. Try the same thing in psql (or any other frontend) and you'll
get the same results.

If you do try to repost this question on another list (pgsql-hackers
etc) I'd be interested in following the discussion, if you could CC: me
I'd be grateful.

[]'s
Daniel Serodio

On Tue, 2003-01-07 at 18:41, Marcos de Barros wrote:
> Hi Group,
>
> I´m a new membrer and have a problem with the commit in jdbc postgres.
> I would appreciate some help.
>
> I have a program that execute 40000 inserts in a table. I set
> autocommit = false before the process and begin the loop. The 39999
> insert, for example, has an error and after the loop i execute the
> commit command. The SQL Server or Oracle driver commit all the 39998
> right inserts. The postgres doesn´t commit one. I figure it´s a bug,
> or i´m doing something wrong. Above is the code:
>
> for (int i=0; i < queryList.length; i++) {
> if (queryList[i] != null) {
> try {
> statement.execute(queryList[i]);
> }
> catch(Exception e) {
> System.out.println("queryList[" + i + "]" + queryList[i]);
> }
> }
> }
> connection.commit();
>
>
> Thank you a lot!
>
> Best Regards,
>
> Marcos de Barros
> Iclass Consultoria
> mbarros(at)iclass(dot)com(dot)br
> http://www.iclass.com.br
> Tels: (21) 2240-8747 / (21) 2220-1480
--
Daniel Serodio <daniel(at)checkforte(dot)com(dot)br>
CheckForte

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message João Paulo Ribeiro 2003-01-07 15:02:57 Re: Problem: commit doesn´t work
Previous Message Jim Downing 2003-01-07 14:35:32 Hibernate issue resolved