1ABORT(7)                 PostgreSQL 15.4 Documentation                ABORT(7)
2
3
4

NAME

6       ABORT - abort the current transaction
7

SYNOPSIS

9       ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
10

DESCRIPTION

12       ABORT rolls back the current transaction and causes all the updates
13       made by the transaction to be discarded. This command is identical in
14       behavior to the standard SQL command ROLLBACK, and is present only for
15       historical reasons.
16

PARAMETERS

18       WORK
19       TRANSACTION
20           Optional key words. They have no effect.
21
22       AND CHAIN
23           If AND CHAIN is specified, a new transaction is immediately started
24           with the same transaction characteristics (see SET TRANSACTION) as
25           the just finished one. Otherwise, no new transaction is started.
26

NOTES

28       Use COMMIT to successfully terminate a transaction.
29
30       Issuing ABORT outside of a transaction block emits a warning and
31       otherwise has no effect.
32

EXAMPLES

34       To abort all changes:
35
36           ABORT;
37

COMPATIBILITY

39       This command is a PostgreSQL extension present for historical reasons.
40       ROLLBACK is the equivalent standard SQL command.
41

SEE ALSO

43       BEGIN(7), COMMIT(7), ROLLBACK(7)
44
45
46
47PostgreSQL 15.4                      2023                             ABORT(7)
Impressum