|COMMIT(7)||PostgreSQL 12.3 Documentation||COMMIT(7)|
COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
Optional key words. They have no effect.
If AND CHAIN is specified, a new transaction is immediately started with the same transaction characteristics (see SET TRANSACTION (SET_TRANSACTION(7))) as the just finished one. Otherwise, no new transaction is started.
Issuing COMMIT when not inside a transaction does no harm, but it will provoke a warning message. COMMIT AND CHAIN when not inside a transaction is an error.