pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
AutoCommit and SQLException
2+ messages / 2 participants
[nested] [flat]

* AutoCommit and SQLException
@ 2004-08-30 10:56  Antony Paul <antonypaul24@hotmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Antony Paul @ 2004-08-30 10:56 UTC (permalink / raw)
  To: pgsql-jdbc

Hi all,
    What happens to transaction when an SQL exception is thrown while it is
in a transaction. Does the connection automatically rollbacks the
transactions or we have to roll back it ?. I am using PreparedStatements and
Statements and no stored procedures.
    Is there any specification for the behaviour of connection pools ?.

rgds
Antony Paul



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: AutoCommit and SQLException
@ 2004-08-30 11:31  Oliver Jowett <oliver@opencloud.com>
  parent: Antony Paul <antonypaul24@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oliver Jowett @ 2004-08-30 11:31 UTC (permalink / raw)
  To: Antony Paul <antonypaul24@hotmail.com>; +Cc: pgsql-jdbc

Antony Paul wrote:
> Hi all,
>     What happens to transaction when an SQL exception is thrown while it is
> in a transaction. Does the connection automatically rollbacks the
> transactions or we have to roll back it ?

You have to roll it back yourself.

PostgreSQL will generate errors on subsequent queries in a transaction 
after an error (until you roll it back), but that's not necessarily true 
of other DBs.

-O



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-08-30 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-30 10:56 AutoCommit and SQLException Antony Paul <antonypaul24@hotmail.com>
2004-08-30 11:31 ` Oliver Jowett <oliver@opencloud.com>

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