SAVEPOINT

SAVEPOINT

Defines a new savepoint within the current transaction.

Synopsis

SAVEPOINT savepoint_name

Description

SAVEPOINT establishes a new savepoint within the current
transaction.

A savepoint is a special mark inside a transaction that allows all
commands that are executed after it was established to be rolled back,
restoring the transaction state to what it was at the time of the savepoint.

Compatibility

SQL requires a savepoint to be destroyed automatically when another savepoint with the same name
is established. In Greenplum Database, the old savepoint is kept, though only the
more recent one will be used when rolling back or releasing. (Releasing the newer
savepoint will cause the older one to again become accessible to ROLLBACK TO SAVEPOINT and RELEASE SAVEPOINT.) Otherwise, SAVEPOINT is fully
SQL conforming.