SPI_COMMIT(3)

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

πŸ’– SPI_COMMIT(3) β€” commit the current transaction πŸ’–

okay so welcome to SPI_COMMIT(3), bestie β€” the PostgreSQL 14.24 manual page for SPI_commit and SPI_commit_and_chain. it's giving β€œtransaction commit but make it SPI,” and we're gonna walk through it together. ✨


🌸 NAME 🌸

SPI_commit, SPI_commit_and_chain β€” commit the current transaction. that's the headline, and honestly? iconic. 🫢

✨ SYNOPSIS ✨

void SPI_commit(void)

void SPI_commit_and_chain(void)

πŸ’… DESCRIPTION πŸ’…

SPI_commit commits the current transaction. think of it as roughly the same energy as running the SQL command COMMIT. no cap. πŸŽ€

once the transaction is committed, a brand-new transaction gets started automatically using default transaction characteristics, so you can keep using SPI facilities without missing a beat. slay. πŸ’–

if there's a failure during commit, tho, the current transaction is instead rolled back, and a new transaction is started. after that, the error is thrown in the usual way. 😭 so yeah β€” commit fail doesn't just leave you hanging; it moves you into a fresh transaction and then yells about the problem. πŸ’€

SPI_commit_and_chain is the same deal, but the new transaction is started with the same transaction characteristics as the just finished one β€” just like the SQL command COMMIT AND CHAIN. periodt. πŸ”₯

⚠️ heads up, bestie: these functions can only be executed if the SPI connection has been set as nonatomic in the call to SPI_connect_ext. that's not optional, it's the vibe check. πŸ’…

signing off from SPI_COMMIT(3) β€” source/version: PostgreSQL 14.24 docs, date: 2026. stay committed, bestie πŸ’œπŸ¦‹

πŸ“¦ where this page comes from