From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: JDBC behaviour |
Date: | 2016-02-21 03:26:34 |
Message-ID: | 56C92E6A.3000209@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-jdbc |
On 2/20/2016 6:20 PM, Sridhar N Bamandlapally wrote:
> from Java/jdbc code, conn.setAutoCommit(false)
>
> insert into employee values(1, 'K1');
> insert into employee values(1, 'K1');
> insert into employee values(2, 'K2');
>
> by looking at exceptions i may rollback or commit, i.e.
> conn.rollback() or conn.commit()
> if I rollback table should be empty,
> if I commit table should have 2 rows
>
> is there any way is possible ?
turn on autocommit if you want each INSERT to be run atomically
independent of the other inserts.
this is going in circles, we've explained a dozens how postgres and jdbc
works.
--
john r pierce, recycling bits in santa cruz
From | Date | Subject | |
---|---|---|---|
Next Message | Vitalii Tymchyshyn | 2016-02-21 04:40:20 | Re: JDBC behaviour |
Previous Message | Jeff Janes | 2016-02-21 02:21:38 | Re: [PERFORM] Why Postgres use a little memory on Windows. |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-02-21 04:19:53 | Re: checkpointer continuous flushing - V18 |
Previous Message | Simon Riggs | 2016-02-21 02:58:49 | Re: Re: Add generate_series(date, date) and generate_series(date, date, integer) |
From | Date | Subject | |
---|---|---|---|
Next Message | Vitalii Tymchyshyn | 2016-02-21 04:40:20 | Re: JDBC behaviour |
Previous Message | Sridhar N Bamandlapally | 2016-02-21 02:20:19 | Re: JDBC behaviour |