RELEASE SAVEPOINT

RELEASE SAVEPOINT – release a previously declared savepoint

RELEASE SAVEPOINT savepoint-name ;

RELEASE SAVEPOINT destroys a savepoint previously defined in the current transaction.

Destroying a savepoint makes it unavailable as a rollback point, but it has no other user visible behavior. It does not undo the effects of commands executed after the savepoint was established. (To do that, see ROLLBACK TO SAVEPOINT.)

RELEASE SAVEPOINT also destroys all savepoints that were established after the named savepoint was established.

START TRANSACTION;
# ...
DECLARE SAVEPOINT f1;
# ...
RELEASE SAVEPOINT f1;
# ...
ROLLBACK;