]> begriffs open source - ai-pg/blob - full-docs/txt/spi-spi-commit.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / spi-spi-commit.txt
1
2 SPI_commit
3
4    SPI_commit, SPI_commit_and_chain — commit the current transaction
5
6 Synopsis
7
8 void SPI_commit(void)
9
10 void SPI_commit_and_chain(void)
11
12 Description
13
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.