COMMIT v13

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 key word - 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 will throw an error if there is 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