COMMIT(7)
π COMMIT(7) β the PostgreSQL 14.24 glow-up
okay bestie, welcome to COMMIT(7) from the PostgreSQL 14.24 docs β this is the page that tells you how to make your transaction official. like, permanent-official. slay.
β¨ NAME β¨
COMMIT β commit the current transaction
π SYNOPSIS π
COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
π¦ DESCRIPTION π¦
so COMMIT commits the current transaction. that's it, that's the whole vibe.
every change your transaction made becomes visible to everybody else, and it's guaranteed to be durable if a crash happens. like, the guaranteed is doing heavy lifting here β once you commit, it's locked in, no takebacks. main character energy fr fr π
πΈ PARAMETERS πΈ
WORKTRANSACTIONβ optional key words, bestie. they have literally no effect. zero. none. they're just there for the aesthetic β¨AND CHAINβ if you sayAND CHAIN, a brand-new transaction starts immediately right after this one finishes, and it inherits the same transaction characteristics as the one you just finished (peepSET TRANSACTION(SET_TRANSACTION(7))for the deets). if you don't say it? no new transaction gets started. that's it π
π NOTES π
- wanna abort a transaction instead? use
ROLLBACK(7). that's the cancel button π«Ά - issuing
COMMITwhen you're not inside a transaction does no harm, but it will provoke a warning message. so likeβ¦ it's fine, but the server is gonna side-eye you π COMMIT AND CHAINwhen you're not inside a transaction? that's an error. not a warning. an actual error. so don't π
β EXAMPLES β
to commit the current transaction and make all those changes permanent:
COMMIT;
periodt. that's the whole example. iconic.
π₯ COMPATIBILITY π₯
the command COMMIT conforms to the SQL standard π
the form COMMIT TRANSACTION is a PostgreSQL extension β so that one's our little bonus, iykyk β¨
π SEE ALSO π
and that's the page, bestie! this one shipped with the PostgreSQL 14.24 documentation, dated 2026 β so yeah, COMMIT(7), brought to you by PostgreSQL 14.24, 2026. go make your transactions permanent, you absolute icon ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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