COMMIT
COMMIT finishes the current transaction successfully.
Synopsis
Section titled “Synopsis”COMMIT [TRANSACTION]Description
Section titled “Description”COMMIT publishes staged row, catalog and index changes as one visibility boundary. TRANSACTION is optional noise syntax.
Parameters
Section titled “Parameters”The command has no data parameters and applies only to the active transaction on the current connection.
Result
Section titled “Result”Success returns an empty command result and leaves no transaction active.
Transaction behavior
Section titled “Transaction behavior”Atomic visibility does not itself select storage durability. The configured synchronization mode determines when committed storage is forced to media.
Errors and limitations
Section titled “Errors and limitations”COMMIT without an active transaction fails. A commit error can leave a transaction rollback-capable; inspect the client state instead of assuming the write either succeeded or vanished.
Privileges
Section titled “Privileges”COMMIT requires no object privilege of its own. Every staged statement has already passed its normal authorization checks.
Example
Section titled “Example”CREATE TABLE ref_commit (id INTEGER PRIMARY KEY, title TEXT);BEGIN;INSERT INTO ref_commit VALUES (1, 'published');COMMIT;SELECT id, title FROM ref_commit;See also
Section titled “See also”See Transactions and Concurrency, BEGIN and Storage.