Skip to content

RELEASE SAVEPOINT

RELEASE SAVEPOINT removes a named rollback point.

RELEASE [SAVEPOINT] savepoint_name

The command keeps all changes made before and after the savepoint. It removes only the ability to roll back to that marker.

SAVEPOINT is optional. savepoint_name follows the same quoted and unquoted identifier rules as SAVEPOINT.

Success returns an empty command result and leaves the transaction active.

RELEASE is valid only inside the transaction that owns the live savepoint. It does not commit any change.

A missing transaction or savepoint fails. Embedded, TCP and the 1.2 CLI route RELEASE SAVEPOINT through the active connection-local transaction.

RELEASE needs no object privilege of its own.

CREATE TABLE ref_release_savepoint (id INTEGER PRIMARY KEY);
BEGIN;
SAVEPOINT completed_step;
INSERT INTO ref_release_savepoint VALUES (1);
RELEASE SAVEPOINT completed_step;
COMMIT;
SELECT id FROM ref_release_savepoint;

See SAVEPOINT, ROLLBACK and Client Interfaces.