EdgeDB 1.0 is launching on Feb 10th! Watch the live event.
Claim your ticket

ROLLBACK TO SAVEPOINT – rollback to a savepoint within the current transaction

ROLLBACK TO SAVEPOINT savepoint-name ;

Rollback all commands that were executed after the savepoint was established. The savepoint remains valid and can be rolled back to again later, if needed.

ROLLBACK TO SAVEPOINT implicitly destroys all savepoints that were established after the named savepoint.

Copy
START TRANSACTION;
# ...
DECLARE SAVEPOINT f1;
# ...
ROLLBACK TO SAVEPOINT f1;
# ...
ROLLBACK;
Light
Dark
System