Contents
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
- PostgreSQL 12
[ AND [ NO ] CHAIN ]
syntax added (commit 280a408b)
Examples
Basic usage example for ROLLBACK
:
postgres=# BEGIN; BEGIN postgres=*# SELECT 1; ?column? ---------- 1 (1 row) postgres=*# ROLLBACK; ROLLBACK
References
- PostgreSQL documentation: ROLLBACK