pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: [JDBC] JDBC behaviour
Date: Thu, 18 Feb 2016 01:34:38 -0800
Message-ID: <56C5902E.1030907@hogranch.com> (raw)
In-Reply-To: <CAGuFTBV14KqA_DmX-_=xefZq7QKn0DER73HbX+dkDehrssqtuw@mail.gmail.com>
References: <CAGuFTBXyEBA7+Na=R8s9gm6Y6-69+QoAQ+bEmwXA9MbqsUQycA@mail.gmail.com>
	<CAGuFTBUu51R=kbgjTgYLYFWkUSnoFo5jWO9E3T6fJW5UXTSgLA@mail.gmail.com>
	<CAB=Je-Euy0Em+nMVixhJy6Ku2K3CiADZ_EfGt2FA_jfKmmgwDg@mail.gmail.com>
	<CAGuFTBV14KqA_DmX-_=xefZq7QKn0DER73HbX+dkDehrssqtuw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 2/18/2016 12:26 AM, Sridhar N Bamandlapally wrote:
> If we want transactions in "begin-end" then its fine,
>
> but in this case all these transactions are independent with 
> autocommit off,

with autocommit OFF, when you issue the first query, jdbc generates a 
postgresql BEGIN;  this starts a postgresql transaction.     To end the 
transaction,  you have to explicitly .commit() or .rollback() ....

with autocommit ON, then jdbc lets each query execute standalone, this 
is postgresql's default behavior if you don't use BEGIN...



-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (73+ messages)  latest in thread

Message-ID: <56C5902E.1030907@hogranch.com>
Permalink:  ../56C5902E.1030907@hogranch.com/
Also on:    postgresql.org/message-id/56C5902E.1030907@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pierce@hogranch.com, pgsql-general@postgresql.org
  Subject: Re: [JDBC] JDBC behaviour
  In-Reply-To: <56C5902E.1030907@hogranch.com>
  References: <CAGuFTBXyEBA7+Na=R8s9gm6Y6-69+QoAQ+bEmwXA9MbqsUQycA@mail.gmail.com> <CAGuFTBUu51R=kbgjTgYLYFWkUSnoFo5jWO9E3T6fJW5UXTSgLA@mail.gmail.com> <CAB=Je-Euy0Em+nMVixhJy6Ku2K3CiADZ_EfGt2FA_jfKmmgwDg@mail.gmail.com> <CAGuFTBV14KqA_DmX-_=xefZq7QKn0DER73HbX+dkDehrssqtuw@mail.gmail.com> <56C5902E.1030907@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox