Re: Transactions through JDBC

From: "Jan de Visser" <jdevisser(at)digitalfairway(dot)com>
To: "Alberto Molteni" <alberto(dot)molteni(at)libero(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transactions through JDBC
Date: 2007-04-11 18:21:29
Message-ID: 200704111421.29550.jdevisser@digitalfairway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 11 April 2007 14:01:55 Alberto Molteni wrote:
> >You should use
> >
> >  conn.setAutoCommit(false);
> >  conn.execute(...)
> >  conn.execute(...)
> >  conn.execute(...)
> >  conn.commit();
> >
> >
> > Thanks!
>
> jan
>
> Then,  conn.setAutoCommit(false); has to be regarded as a begin statement?

I think BEGIN is implicitly send when you execute the first statement in a new
transaction. You shouldn't worry about it.

> I had already put the autocommit flag to false soon after the creation of
> the connection, since I saw an improvement in the performances without that
> flag and moreover I wanted to make transactions on my own.

Makes sense.

>
> I will change as you told me!
>
> Thanks!

jan

--
--------------------------------------------------------------
Jan de Visser                     jdevisser(at)digitalfairway(dot)com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Edson 2007-04-11 18:43:39 Re: Dumping part (not all) of the data in a database...methods?
Previous Message Merlin Moncure 2007-04-11 18:20:08 Re: Dumping part (not all) of the data in a database...methods?