Re: Information on savepoint requirement within transctions - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Information on savepoint requirement within transctions
Date
Msg-id CANu8Fiy-iTsuDeQ5Vq2U0TEaUTWD2+g5+rSmhEw6qv3pRz3DbA@mail.gmail.com
Whole thread Raw
In response to Re: Information on savepoint requirement within transctions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Information on savepoint requirement within transctions  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
>
As far as I'm aware neither PostgreSQL nor OS version do matter for this

Yes as of this date. However, that is not to say that the SQL standard (or PostgreSQL) may change
in the _future_, such that there "may" be a "ROLLBACK TO SAVEPOINT OR CONTINUE" after a failure,
in which case, someone else may be confused because there is no reference to the actual PostgreSQL version.
That is why it is important to include the version "AT THE TIME OF POSTING" so that future op's will
have a point of reference for the answer.

On Fri, Jan 26, 2018 at 11:12 AM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Fri, Jan 26, 2018 at 8:57 AM, Robert Zenz <robert.zenz@sibvisions.com> wrote:
In PostgreSQL the use of savepoints is
required:

    start transaction
    insert into A
    create savepoint
    insert into B but fail
    rollback to savepoint
    insert into C
    commit

Otherwise the transaction is, after the failed statement, in a state in which it
can not be used anymore. Is that correct?
 
​Yes.

David J.
 



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Information on savepoint requirement within transctions
Next
From: "David G. Johnston"
Date:
Subject: Re: Information on savepoint requirement within transctions