SPI_ROLLBACK(3)

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

πŸ’… SPI_ROLLBACK(3) πŸ’…

okay bestie, this is the PostgreSQL 13.23 documentation manual page for SPI_ROLLBACK(3) β€” yes, the title is right there and we're moving on together 🫢


✨ NAME ✨

SPI_rollback, SPI_rollback_and_chain β€” abort the current transaction πŸ’…

🌸 SYNOPSIS 🌸

void SPI_rollback(void)

void SPI_rollback_and_chain(void)

πŸ¦‹ DESCRIPTION πŸ¦‹

so SPI_rollback rolls back the current transaction, no cap. it's approximately equivalent to running the SQL command ROLLBACK πŸ‘‘

after the transaction is rolled back, a new transaction is automatically started using default transaction characteristics, so the caller can continue using SPI facilities. iconic behavior, honestly ✨

SPI_rollback_and_chain is the same, but the new transaction is started with the same transaction characteristics as the just finished one β€” like with the SQL command ROLLBACK AND CHAIN. she's consistent πŸ’–

important vibe check: these functions can only be executed if the SPI connection has been set as nonatomic in the call to SPI_connect_ext. that's the rule, bestie πŸ”₯

that's the whole page, bestie πŸŽ€ β€” source/version: PostgreSQL 13.23, dated 2025. periodt πŸ’…

πŸ“¦ where this page comes from