Re: COMMIT after an ERROR?

From: patrick keshishian <patrick(at)pioneerdigital(dot)com>
To: Charles Tassell <ctassell(at)isn(dot)net>
Cc: J C Lawrence <claw(at)kanga(dot)nu>, pgsql-general(at)postgresql(dot)org
Subject: Re: COMMIT after an ERROR?
Date: 2001-10-13 02:35:30
Message-ID: 20011012193530.M13487@pioneerdigital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


The only things that are not rolled back are advancing of
sequences and such. I suspect serial types also exhibit similar
behavior to sequences.

On Fri, Oct 12, 2001 at 04:10:49PM -0300, Charles Tassell wrote:
> The failed query will abort the transaction, and throw out every command
> that comes before or after it until your rollback. You don't have to
> specifically issue a rollback unless you want to issue more commands
> though. When you disconnect from the DB it will automatically roll back
> the transaction.
>
>
> At 05:18 AM 10/12/01, 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?
> >
> >--
> >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.
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 4: Don't 'kill -9' the postmaster

--
patrick keshishian
Pioneer Digital Technologies

Gnu __ _
-o)/ / (_)__ __ ____ __
/\\ /__/ / _ \/ // /\ \/ /
_\_v __/_/_//_/\_,_/ /_/\_\

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-10-13 03:40:46 Re: Rotating PostgreSQL LOGs on Web site ??
Previous Message speedboy 2001-10-13 02:33:46 Re: what's going on with this list?