SPI_ROLLBACK(3)
π SPI_ROLLBACK(3) β PostgreSQL 16.15 Documentation
okay bestie, welcome to the SPI_ROLLBACK(3) page β transaction rollback edition, but make it cute β¨
π NAME π
SPI_rollback, SPI_rollback_and_chain β abort the current transaction π
ββοΈπ₯
πΈ SYNOPSIS πΈ
void SPI_rollback(void)
void SPI_rollback_and_chain(void)
π¦ DESCRIPTION π¦
Okay so SPI_rollback is the βnope, undo thatβ button for the current transaction π
It is 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. Slay β the caller gets to keep doing SPI things π«Ά
SPI_rollback_and_chain is the same deal, but the new transaction is started with the same transaction characteristics as the just finished one, like with the SQL command ROLLBACK AND CHAIN. Iconic chain-reaction behavior, no cap β¨
π¨ 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 requirement, periodt.
mwah π β this page is from PostgreSQL 16.15, dated 2026, and the man page is SPI_ROLLBACK(3) π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-docs 16.15-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