COMMIT v15

Name

COMMIT  Commit the current transaction.

Synopsis

COMMIT [ WORK ]

Description

COMMIT commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs.

Parameters

WORK

Optional keyword that has no effect.

Notes

Use ROLLBACK to abort a transaction. Issuing COMMIT when not inside a transaction does no harm.

Note

Executing a COMMIT in a plpgsql procedure throws an error if there's an Oracle-style SPL procedure on the runtime stack.

Examples

To commit the current transaction and make all changes permanent:

COMMIT;

See also

ROLLBACK, ROLLBACK TO SAVEPOINT