Re: [spf:guess] Re: ROLLBACK TO SAVEPOINT

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Sam Vilain <sam(at)vilain(dot)net>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [spf:guess] Re: ROLLBACK TO SAVEPOINT
Date: 2010-05-26 22:58:06
Message-ID: 4BFDA77E.6030302@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26/05/10 02:00, Sam Vilain wrote:
> Florian Pflug wrote:
>> On May 25, 2010, at 12:18 , Heikki Linnakangas wrote:
>>> Releasing the newer savepoint will cause the older one to again become accessible, as the doc says, but rolling back to a savepoint does not implicitly release it. You'll have to use RELEASE SAVEPOINT for that.
>>
>> Ah, now I get it. Thanks.
>>
>> Would changing "Releasing the newer savepoint will cause ... " to "Explicitly releasing the newer savepoint" or maybe even "Explicitly releasing the newer savepoint with RELEASE SAVEPOINT will cause ..." make things clearer?
>
> Yes, probably - your misreading matches my misreading of it :-)

+1.

> There is another way you can get there - releasing to a savepoint before
> the re-used savepoint name will also release the savepoints after it.
>
> ie
>
> savepoint foo;
> savepoint bar;
> savepoint foo;
> release to savepoint bar;
> release to savepoint foo;
>
> After the first release, the second 'foo' savepoint is gone. I think
> this is a key advantage in saving the old savepoints.

Yep. Do we need to mention that in that notice? I don't think so, it
would become really verbose. Florian's wording above seems fine.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-05-26 23:04:49 Re: primary/secondary/master/slave/standby
Previous Message Andrew Dunstan 2010-05-26 22:52:33 Re: functional call named notation clashes with SQL feature