COMMIT(7)

πŸ“¦ version 16.15, in opensuse-leap 16.0

✨ 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 πŸŽ€

  • WORK
  • TRANSACTION β€” optional key words, bestie. They literally have no effect. Decorative. Iconic. Zero notes πŸ™ˆ
  • AND CHAIN β€” if you specify AND CHAIN, a brand new transaction starts immediately with the same transaction characteristics as the one you just finished (see SET 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 😭

Issuing COMMIT when you're not inside a transaction does no harm, but it will provoke a warning message. And COMMIT AND CHAIN when 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 πŸ“

BEGIN(7), ROLLBACK(7)


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