From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- doc/src/sgml/html/spi-transaction.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/src/sgml/html/spi-transaction.html (limited to 'doc/src/sgml/html/spi-transaction.html') diff --git a/doc/src/sgml/html/spi-transaction.html b/doc/src/sgml/html/spi-transaction.html new file mode 100644 index 0000000..2c2eab5 --- /dev/null +++ b/doc/src/sgml/html/spi-transaction.html @@ -0,0 +1,19 @@ + +47.4. Transaction Management

47.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 + as COMMIT and ROLLBACK through SPI + functions such as SPI_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 the CALL + command, taking the context of the CALL 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. +

\ No newline at end of file -- cgit v1.2.3