]> begriffs open source - ai-pg/blob - full-docs/txt/sql-commit.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-commit.txt
1
2 COMMIT
3
4    COMMIT — commit the current transaction
5
6 Synopsis
7
8 COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
9
10 Description
11
12    COMMIT commits the current transaction. All changes made by the
13    transaction become visible to others and are guaranteed to be durable
14    if a crash occurs.
15
16 Parameters
17
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
24           started with the same transaction characteristics (see SET
25           TRANSACTION) as the just finished one. Otherwise, no new
26           transaction is started.
27
28 Notes
29
30    Use ROLLBACK to abort a transaction.
31
32    Issuing COMMIT when not inside a transaction does no harm, but it will
33    provoke a warning message. COMMIT AND CHAIN when not inside a
34    transaction is an error.
35
36 Examples
37
38    To commit the current transaction and make all changes permanent:
39 COMMIT;
40
41 Compatibility
42
43    The command COMMIT conforms to the SQL standard. The form COMMIT
44    TRANSACTION is a PostgreSQL extension.
45
46 See Also
47
48    BEGIN, ROLLBACK