Re: Transaction Questions - Mailing list pgsql-novice

From Tom Lane
Subject Re: Transaction Questions
Date
Msg-id 3743.1140797696@sss.pgh.pa.us
Whole thread Raw
In response to Transaction Questions  (Richard Kut <rkut@intelerad.com>)
Responses Re: Transaction Questions
List pgsql-novice
Richard Kut <rkut@intelerad.com> writes:
> and that works as expected. However, if I get an error within the transaction
> anywhere after the SAVEPOINT command, then the entire transaction fails, and
> any changes made prior to the SAVEPOINT are rolled back.

Only because you deliberately told the system to roll back the entire
transaction.  You want to use ROLLBACK TO SAVEPOINT instead.

            regards, tom lane

pgsql-novice by date:

Previous
From: Richard Kut
Date:
Subject: Transaction Questions
Next
From: Richard Kut
Date:
Subject: Re: Transaction Questions