COMMIT(7)
๐ COMMIT(7) ๐
okay bestie, welcome to the COMMIT page โ it's the PostgreSQL 18.6 documentation moment, and we're gonna talk about the single most satisfying button in all of SQL. no cap. ๐ซถ
โจ NAME โจ
COMMIT โ commit the current transaction ๐
๐ธ SYNOPSIS ๐ธ
COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
๐ฆ DESCRIPTION ๐ฆ
COMMIT commits the current transaction. Every change made by that transaction becomes visible to others, and it's guaranteed to be durable if a crash occurs. like... it's locked in. periodt. ๐
๐ PARAMETERS ๐
WORKTRANSACTION
optional key words, bestie. they have no effect. literally none. they're just there vibing. ๐ซง
AND CHAIN
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. so it's giving "and another one" energy ๐ฅ
๐ NOTES ๐
use ROLLBACK(7) to abort a transaction. that's the other button. choose wisely. ๐ญ
issuing COMMIT when not inside a transaction does no harm, but it will provoke a warning message. so like, rude of you, but not fatal. COMMIT AND CHAIN when not inside a transaction, though? that's an error. not a vibe. ๐
๐ EXAMPLES ๐
to commit the current transaction and make all changes permanent:
COMMIT;
slay. that's it. that's the whole thing. โจ
โญ COMPATIBILITY โญ
the command COMMIT conforms to the SQL standard. the form COMMIT TRANSACTION is a PostgreSQL extension. so we're standards-compliant and we have a lil bonus form. main character energy fr fr. ๐
๐ SEE ALSO ๐
and that's the whole page, bestie!! this was the PostgreSQL 18.6 docs, dated 2026, and the page is COMMIT(7) โ mwah, go commit something iconic ๐โจ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms