Re: COMMIT after an ERROR? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: COMMIT after an ERROR?
Date
Msg-id Pine.BSF.4.21.0110121104300.97475-100000@megazone23.bigpanda.com
Whole thread Raw
In response to COMMIT after an ERROR?  (J C Lawrence <claw@kanga.nu>)
Responses Re: COMMIT after an ERROR?
List pgsql-general
On Fri, 12 Oct 2001, J C Lawrence wrote:

>
> Does an error during a transaction invalidate the transaction?
>
> eg
>
>   BEGIN
>   SomeQueryThatSucceeds
>   SomeQueryThatFails
>   SomeOtherQueryThatSucceeds
>   COMMIT
>
> Will the transaction successfully COMMIT, or will the COMMIT fail?
>
> Translation: Do I need to monitor for error conditions during a
> transaction and manually do the ROLLBACK in those cases?

The transaction will be forced to roll back.



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ERROR: Unrecognized language specified ...
Next
From: Doug McNaught
Date:
Subject: Re: COMMIT after an ERROR?