Skip to content
masterclass Buddy

PostgreSQL · Command

ROLLBACK

ROLLBACK cancels the current PostgreSQL transaction and discards its updates. Use AND CHAIN to start a new transaction with the same transaction settings.

Last updated

Syntax

ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BEGIN
  • COMMIT
  • ROLLBACK TO SAVEPOINT
  • SET TRANSACTION

Source: PostgreSQL: Documentation: 18: ROLLBACK. Checked 2026-11-03.