1SPI_COMMIT(3)            PostgreSQL 14.3 Documentation           SPI_COMMIT(3)
2
3
4

NAME

6       SPI_commit, SPI_commit_and_chain - commit the current transaction
7

SYNOPSIS

9       void SPI_commit(void)
10
11       void SPI_commit_and_chain(void)
12

DESCRIPTION

14       SPI_commit commits the current transaction. It is approximately
15       equivalent to running the SQL command COMMIT. After the transaction is
16       committed, a new transaction is automatically started using default
17       transaction characteristics, so that the caller can continue using SPI
18       facilities. If there is a failure during commit, the current
19       transaction is instead rolled back and a new transaction is started,
20       after which the error is thrown in the usual way.
21
22       SPI_commit_and_chain is the same, but the new transaction is started
23       with the same transaction characteristics as the just finished one,
24       like with the SQL command COMMIT AND CHAIN.
25
26       These functions can only be executed if the SPI connection has been set
27       as nonatomic in the call to SPI_connect_ext.
28
29
30
31PostgreSQL 14.3                      2022                        SPI_COMMIT(3)
Impressum