Description

This command will roll back all commands that were run after the savepoint was established. The savepoint remains valid and can be rolled back to again later, if needed.

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

WORK

TRANSACTION

savepoint_name

The name of a savepoint to roll back to.

Notes

Use RELEASE SAVEPOINT to destroy a savepoint without discarding the effects of commands run after it was established.

Specifying a savepoint name that has not been established is an error.

To undo the effects of the commands run after my_savepoint was established:

Cursor positions are not affected by a savepoint rollback:

Compatibility

The SQL standard specifies that the key word SAVEPOINT is mandatory, but Greenplum Database (and Oracle) allow it to be omitted. SQL allows only , not TRANSACTION, as a noise word after ROLLBACK. Also, SQL has an optional clause AND [NO] CHAIN which is not currently supported by Greenplum Database. Otherwise, this command conforms to the SQL standard.

, COMMIT, , RELEASE SAVEPOINT,