]> begriffs open source - ai-pg/blob - full-docs/txt/sql-abort.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-abort.txt
1
2 ABORT
3
4    ABORT — abort the current transaction
5
6 Synopsis
7
8 ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
9
10 Description
11
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
17 Parameters
18
19    WORK
20           TRANSACTION
21           Optional key words. They have no effect.
22
23    AND CHAIN
24           If AND CHAIN is specified, a new transaction is immediately
25           started with the same transaction characteristics (see SET
26           TRANSACTION) as the just finished one. Otherwise, no new
27           transaction is started.
28
29 Notes
30
31    Use COMMIT to successfully terminate a transaction.
32
33    Issuing ABORT outside of a transaction block emits a warning and
34    otherwise has no effect.
35
36 Examples
37
38    To abort all changes:
39 ABORT;
40
41 Compatibility
42
43    This command is a PostgreSQL extension present for historical reasons.
44    ROLLBACK is the equivalent standard SQL command.
45
46 See Also
47
48    BEGIN, COMMIT, ROLLBACK