]> begriffs open source - ai-pg/blob - full-docs/txt/sql-commit-prepared.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-commit-prepared.txt
1
2 COMMIT PREPARED
3
4    COMMIT PREPARED — commit a transaction that was earlier prepared for
5    two-phase commit
6
7 Synopsis
8
9 COMMIT PREPARED transaction_id
10
11 Description
12
13    COMMIT PREPARED commits a transaction that is in prepared state.
14
15 Parameters
16
17    transaction_id
18           The transaction identifier of the transaction that is to be
19           committed.
20
21 Notes
22
23    To commit a prepared transaction, you must be either the same user that
24    executed the transaction originally, or a superuser. But you do not
25    have to be in the same session that executed the transaction.
26
27    This command cannot be executed inside a transaction block. The
28    prepared transaction is committed immediately.
29
30    All currently available prepared transactions are listed in the
31    pg_prepared_xacts system view.
32
33 Examples
34
35    Commit the transaction identified by the transaction identifier foobar:
36 COMMIT PREPARED 'foobar';
37
38 Compatibility
39
40    COMMIT PREPARED is a PostgreSQL extension. It is intended for use by
41    external transaction management systems, some of which are covered by
42    standards (such as X/Open XA), but the SQL side of those systems is not
43    standardized.
44
45 See Also
46
47    PREPARE TRANSACTION, ROLLBACK PREPARED