1COMMIT(7)                PostgreSQL 12.6 Documentation               COMMIT(7)
2
3
4

NAME

6       COMMIT - commit the current transaction
7

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

NOTES

28       Use ROLLBACK(7) to abort a transaction.
29
30       Issuing COMMIT when not inside a transaction does no harm, but it will
31       provoke a warning message.  COMMIT AND CHAIN when not inside a
32       transaction is an error.
33

EXAMPLES

35       To commit the current transaction and make all changes permanent:
36
37           COMMIT;
38

COMPATIBILITY

40       The command COMMIT conforms to the SQL standard. The form COMMIT
41       TRANSACTION is a PostgreSQL extension.
42

SEE ALSO

44       BEGIN(7), ROLLBACK(7)
45
46
47
48PostgreSQL 12.6                      2021                            COMMIT(7)
Impressum