Re: COMMIT after an ERROR?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: J C Lawrence <claw(at)kanga(dot)nu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COMMIT after an ERROR?
Date: 2001-10-12 18:05:21
Message-ID: Pine.BSF.4.21.0110121104300.97475-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-10-12 18:11:33 Re: Joining Between Databases
Previous Message Tom Lane 2001-10-12 18:00:48 Re: VACUUM, 24/7 availability and 7.2