Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
45.4. Transaction Management
Prev UpChapter 45. Server Programming InterfaceHome Next

45.4. Transaction Management#

SPI_commit — commit the current transaction
SPI_rollback — abort the current transaction
SPI_start_transaction — obsolete function

It is not possible to run transaction control commands such asCOMMIT andROLLBACK through SPI functions such asSPI_execute. There are, however, separate interface functions that allow transaction control through SPI.

It is not generally safe and sensible to start and end transactions in arbitrary user-defined SQL-callable functions without taking into account the context in which they are called. For example, a transaction boundary in the middle of a function that is part of a complex SQL expression that is part of some SQL command will probably result in obscure internal errors or crashes. The interface functions presented here are primarily intended to be used by procedural language implementations to support transaction management in SQL-level procedures that are invoked by theCALL command, taking the context of theCALL invocation into account. SPI-using procedures implemented in C can implement the same logic, but the details of that are beyond the scope of this documentation.


Prev Up Next
SPI_freeplan Home SPI_commit
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp