COMMIT after an ERROR? - Mailing list pgsql-general

From J C Lawrence
Subject COMMIT after an ERROR?
Date
Msg-id 7034.1002874703@kanga.nu
Whole thread Raw
Responses Re: COMMIT after an ERROR?  (Nathan Clemons <nathan@windsofstorm.net>)
Re: COMMIT after an ERROR?  (Charles Tassell <ctassell@isn.net>)
Re: COMMIT after an ERROR?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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@kanga.nu               He lived as a devil, eh?
http://www.kanga.nu/~claw/  Evil is a name of a foeman, as I live.

pgsql-general by date:

Previous
From: Allan Engelhardt
Date:
Subject: Re: error codes when running pg_dumpall from a perl script.
Next
From: Tom Lane
Date:
Subject: Re: Postgres server locks up