Re: JDBC behaviour - Mailing list pgsql-jdbc

From John R Pierce
Subject Re: JDBC behaviour
Date
Msg-id 56C803C1.2020904@hogranch.com
Whole thread Raw
In response to Re: JDBC behaviour  (Sridhar N Bamandlapally <sridhar.bn1@gmail.com>)
List pgsql-jdbc
On 2/19/2016 8:40 PM, Sridhar N Bamandlapally wrote:
> one feature of PostgreSQL is implemented into another feature of Java
> ( i say subject PostgreSQL::autocommit Vs JDBC::setAutoCommit ),
> i.e PostgreSQL::"set autocommit to FALSE" is implemented as
> JDBC::"BEGIN-<statements>-END"
>
> currently PostgreSQL::"set autocommit to FALSE ( not supported )
>
> say in future, if PostgreSQL come with proper fix/support for "set
> autocommit to FALSE" then will JDBC-team change the to code to
> JDBC::"set autocommit to FALSE" ?, then what about existing behaviors
> dependency applications ?

in autocommit 'off' mode, most SQL databases start a transaction when
you execute any modifying query, these transactions are by default
atomic, and nothing is written til you commit.   any errors cause the
transaction to be put in failure mode, and the whole thing has to be
rolled back.      there are differing levels of transaction isolation
depending on database capabilities and settings, but most relational
transactional databases adhere to these basic semantics, and
transactions are all or nothing.

postgres differs only in that it is always in autocommit ON mode, unless
you begin a transaction explicitly with BEGIN.      the net effect is
exactly the same.







--
john r pierce, recycling bits in santa cruz



pgsql-jdbc by date:

Previous
From: Sridhar N Bamandlapally
Date:
Subject: Re: JDBC behaviour
Next
From: John R Pierce
Date:
Subject: Re: JDBC behaviour