ABORT

An SQL command for rolling back the current transaction

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

ABORT has always been present in PostgreSQL.

Usage

ABORT is functionally equivalent to the SQL standard ROLLBACK command and has been retained for historical reasons.

Change history

Examples

Basic execution of ABORT:

postgres=# BEGIN;
BEGIN

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

postgres=*# ABORT;
ROLLBACK
  • PostgreSQL documentation: ABORT

Categories

SQL command, Transaction command, Transactions

See also

ROLLBACK