END(7)

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

πŸ’– END β€” bestie, we're locking it IN πŸ’–

PostgreSQL 18.6 Documentation · section 7 · the one where you finally press send 🫢


✨ NAME ✨

END β€” commit the current transaction πŸ’…


🌸 SYNOPSIS 🌸

END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, END commits the current transaction. That's it, that's the whole vibe. Every change you made in that transaction becomes visible to others, and it's guaranteed to be durable if a crash occurs β€” like, bestie, it's written down, it's real, it survives the chaos. 🌈

This command is a PostgreSQL extension that is equivalent to COMMIT. Same energy, different name. Iconic of them tbh. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • WORK
  • TRANSACTION

Optional key words. They have no effect. Literally zero. They're just there. Decorative. Fr fr. πŸ’€

  • 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 like... you close the door and instantly open the exact same door again. Main character behavior. ✨


πŸ’œ NOTES πŸ’œ

Use ROLLBACK to abort a transaction. Different button, different outcome, choose wisely bestie. πŸšͺ

Issuing END when you're not inside a transaction does no harm, but it will provoke a warning message. So like, it won't yell at you, but it will side-eye you a little. 😭


🌟 EXAMPLES 🌟

To commit the current transaction and make all changes permanent:

END;

Slay. Done. Committed. Periodt. πŸ’…


🧚 COMPATIBILITY 🧚

END is a PostgreSQL extension that provides functionality equivalent to COMMIT, which is specified in the SQL standard. So the standard girlies get COMMIT, and we also get END because we're extra. πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘

BEGIN(7), COMMIT(7), ROLLBACK(7)


PostgreSQL 18.6 Β· 2026 β€” okay bye bestie, go commit something (a transaction, not a crime 🫢) βœ¨πŸ’–πŸŒΈ

πŸ“¦ where this page comes from