Re: Functions, savepoints, autocommit = I am confused !

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tim Smith <randomdev4+postgres(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Functions, savepoints, autocommit = I am confused !
Date: 2015-06-26 15:09:54
Message-ID: CAKFQuwbvwn8ejXJuzB_q+Dr0VaN++GwYU1BzhkHD-z8Q4NMwsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 26, 2015 at 10:48 AM, Tim Smith <randomdev4+postgres(at)gmail(dot)com>
wrote:

> Hi David,
>
> I should have perhaps made clear this was a saved function, so my
> understanding is ROLLBACK can't be used as its implicit.
>

​I am pretty certain "ROLLBACK" cannot be used but the "ROLLBACK TO
SAVEPOINT" can - they are and do two different things. If you can issue a
savepoint inside a stored function it would stand to reason you must be
able to rollback to that named savepoint from within the same - nothing
external would even known about it.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-06-26 15:17:48 Re: Functions, savepoints, autocommit = I am confused !
Previous Message Tim Smith 2015-06-26 14:48:07 Re: Functions, savepoints, autocommit = I am confused !