Skip site navigation (1) Skip section navigation (2)

Re: Using auto-commit OFF for transactions - instead of

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Harry Mantheakis <harry(at)mantheakis(dot)freeserve(dot)co(dot)uk>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Using auto-commit OFF for transactions - instead of
Date: 2004-03-08 12:15:31
Message-ID: 1078748131.2419.18.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

You should use the driver's set autocommit(false) instead, as then the
driver will know the state of the connection.

BTW, I'm sure oracle has a similiar "begin" statement.

On Mon, 2004-03-08 at 06:40, Harry Mantheakis wrote:
> Hello
> I ported a relatively simple application using Oracle 8i with a JDBC client
> to PostgreSQL 7.4 with the same JDBC client, and everything just worked!
> One thing that did come to light was that PG offers a proprietary 'BEGIN'
> statement as a means of controlling transactions.
> With Oracle, I was used to setting auto-commit to false at the start of a
> transaction, and then calling commit or rollback at the end.
> Is it safe for me to continue setting auto-commit to false for transactions,
> and are there any compelling reasons - significant performance gains,
> perhaps - why I might want to consider adopting PG's 'BEGIN' statement
> instead?
> Many thanks in anticipation.
> Harry Mantheakis
> London, UK
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
Dave Cramer
519 939 0336
ICQ # 14675561

In response to


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2004-03-08 13:31:42
Subject: Re: Using auto-commit OFF for transactions - instead of
Previous:From: Harry MantheakisDate: 2004-03-08 11:40:18
Subject: Using auto-commit OFF for transactions - instead of BEGIN

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group