SPI_ROLLBACK(3)
π SPI_ROLLBACK(3) π
okay so bestie, this is from the PostgreSQL 17.11 documentation, and it's all about aborting the current transaction. yes, the dramatic undo button. no cap. π«Ά
π NAME π
SPI_rollback, SPI_rollback_and_chain β abort the current transaction
β¨ SYNOPSIS β¨
void SPI_rollback(void)
void SPI_rollback_and_chain(void)
π¦ DESCRIPTION π¦
SPI_rollback rolls back the current transaction. 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 that the caller can continue using SPI facilities. it's giving "clean slate, but make it automatic" π
β¨
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. same rollback energy, except the new transaction keeps the same transaction characteristics as the one that just finished β exactly like ROLLBACK AND CHAIN, periodt. π₯
π¨ important: these functions can only be executed if the SPI connection has been set asnonatomicin the call toSPI_connect_ext. no nonatomic connection, no rollback era. π
π«Ά that's the whole page, bestie. source/version and date: PostgreSQL 17.11, 2026. slay. ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-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