Re: SAVEPOINT SQL conformance - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: SAVEPOINT SQL conformance
Date
Msg-id 002801c49e4e$83ab5d20$d604460a@zaphod
Whole thread Raw
In response to SAVEPOINT SQL conformance  ("Michael Paesold" <mpaesold@gmx.at>)
List pgsql-hackers
Oliver Jowett wrote:
> BEGIN
> SAVEPOINT a
>   -- work
> SAVEPOINT b
>   -- work
> SAVEPOINT a
>   -- work
> ROLLBACK TO b
>   -- work
>
> This is valid: the standard says that the second "SAVEPOINT a" destroys
> and recreates the savepoint "a", but doesn't say that it destroys
> intervening savepoints. In contrast, RELEASE SAVEPOINT explicitly says
> that it destroys the specified savepoint and all savepoints established
> since the specified savepoint.
>
> If you converted the second "SAVEPOINT a" into "RELEASE SAVEPOINT a;
> SAVEPOINT a" then savepoint "b" would be incorrectly destroyed.

You are right, that proves my proposal to be incorrect, because an implicit
RELEASE SAVEPOINT a; has side effects that are definitively against the
standard or what you would expect.

Best Regards,
Michael Paesold



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: How to add locale support for each column?
Next
From: Greg Stark
Date:
Subject: Re: How to add locale support for each column?