ROLLBACK

A command for rolling back the current transaction

ROLLBACK is a transaction command for rolling back the current transaction.

ROLLBACK has always been present in PostgreSQL.

Change history

Examples

Basic execution of ROLLBACK:

postgres=# BEGIN;
BEGIN

postgres=*# SELECT 1;
 ?column? 
----------
        1
(1 row)

postgres=*# ROLLBACK;
ROLLBACK

Categories

SQL command, Transaction command, Transactions

See also

BEGIN, COMMIT, ROLLBACK PREPARED