COMMIT after an ERROR?

From: J C Lawrence <claw(at)kanga(dot)nu>
To: pgsql-general(at)postgresql(dot)org
Subject: COMMIT after an ERROR?
Date: 2001-10-12 08:18:23
Message-ID: 7034.1002874703@kanga.nu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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?

--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
claw(at)kanga(dot)nu He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tek1 2001-10-12 09:33:19 Re: VACUUM, 24/7 availability and 7.2
Previous Message Luke 2001-10-12 07:11:51 lo_export