Re: [JDBC] JDBC behaviour

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [JDBC] JDBC behaviour
Date: 2016-02-18 09:34:38
Message-ID: 56C5902E.1030907@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sridhar N Bamandlapally 2016-02-18 09:38:23 Re: JDBC behaviour
Previous Message Andreas Joseph Krogh 2016-02-18 09:24:29 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Sridhar N Bamandlapally 2016-02-18 09:38:23 Re: JDBC behaviour
Previous Message Andreas Joseph Krogh 2016-02-18 09:24:29 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sridhar N Bamandlapally 2016-02-18 09:38:23 Re: JDBC behaviour
Previous Message Andreas Joseph Krogh 2016-02-18 09:24:29 Re: JDBC behaviour