Re: JDBC behaviour

From: Sridhar N Bamandlapally <sridhar(dot)bn1(at)gmail(dot)com>
To: Andreas Joseph Krogh <andreas(at)visena(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-18 11:11:35
Message-ID: CAGuFTBVfqQUx4wFyBKG7DhBBbTRCiuYU2FSUM1WLUnazSvUJZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

our scenario is to commit successful transaction without worry of failed
transactions ( these will be logged for verification into error-log-table )

however, the only method for us in java/framework is to put
postgresql-checkpoint and do "try-catch, savepoint, statement, on-error
rollback to savepoint"

On Thu, Feb 18, 2016 at 4:32 PM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
wrote:

> På torsdag 18. februar 2016 kl. 11:59:50, skrev Andreas Joseph Krogh <
> andreas(at)visena(dot)com>:
>
> På torsdag 18. februar 2016 kl. 11:43:36, skrev Sridhar N Bamandlapally <
> sridhar(dot)bn1(at)gmail(dot)com>:
>
> The code/framework is written to handle batch inserts, which is common for
> all databases
>
> I feel, PostgreSQL JDBC may need to modify setAutoCommit(false) code to
> "implicit savepoint - on error - rollback to savepoint"
>
>
> You simply cannot have batch-inserts in the same transaction and expecting
> the batch not to fail if one of the statements in the batch fails.
>
>
> Note that it's perfectly doable to have a connection-pool configured with
> autocommit=false and do the transaction-management your self. Then you can
> do whatever you want when one statement fails. You would want to rollback
> that statement...
>
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> andreas(at)visena(dot)com
> www.visena.com
> <https://www.visena.com>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sridhar N Bamandlapally 2016-02-18 11:26:05 Re: JDBC behaviour
Previous Message Andreas Joseph Krogh 2016-02-18 11:02:00 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2016-02-18 11:22:32 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Previous Message Andreas Joseph Krogh 2016-02-18 11:02:00 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sridhar N Bamandlapally 2016-02-18 11:26:05 Re: JDBC behaviour
Previous Message Andreas Joseph Krogh 2016-02-18 11:02:00 Re: JDBC behaviour