COMMIT(7)
β¨ COMMIT(7) β¨
okay bestie, welcome to the COMMIT page β it's COMMIT(7) from the PostgreSQL 16.15 docs and honestly it's giving "short but powerful" main character energy π
πΈ NAME πΈ
COMMIT β the way you tell your current transaction "okay babe, you're done, lock it in" π
π¦ SYNOPSIS π¦
COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
π DESCRIPTION π
So COMMIT commits the current transaction. That's it, that's the whole vibe β¨
Every change that transaction made becomes visible to everyone else, and it's guaranteed to be durable if a crash occurs β like, crash-proof, no cap, your data survives π₯
π PARAMETERS π
WORKTRANSACTIONβ optional key words, bestie. They literally have no effect. Decorative. Iconic. Zero notes πAND CHAINβ if you specifyAND CHAIN, a brand new transaction starts immediately with the same transaction characteristics as the one you just finished (seeSET TRANSACTION(SET_TRANSACTION(7))). If you don't specify it, no new transaction is started. Simple as that π«Ά
β NOTES β
Use ROLLBACK(7) to abort a transaction β different vibe, different outcome π
IssuingCOMMITwhen you're not inside a transaction does no harm, but it will provoke a warning message. AndCOMMIT AND CHAINwhen you're not inside a transaction? That's an error. Full stop. π
π EXAMPLES π
To commit the current transaction and make all changes permanent:
COMMIT;
that's the whole example. short king π
π COMPATIBILITY π
The command COMMIT conforms to the SQL standard π The form COMMIT TRANSACTION is a PostgreSQL extension β so it's a little extra, but it's our extra π§
π SEE ALSO π
okay that's the whole page!! mwah π this was COMMIT(7) from the PostgreSQL 16.15 documentation, dated 2026 β go forth and commit responsibly, bestie, and remember: commit early, commit often, and always rollback your regrets πΈπ¦π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms