BEGIN [ WORK | TRANSACTION ]
None
This signifies that a new transaction has been started.
This indicates that a transaction was already in progress. The current transaction is not affected.
BEGIN initiates a user transaction which Postgres will guarantee is serializable with respect to all concurrently executing transactions. Postgres uses two-phase locking to perform this task. If the transaction is committed, Postgres will ensure either that all updates are done or else that none of them are done. Transactions have the standard ACID (atomic, consistent, isolatable, and durable) property.
The keyword TRANSACTION is just a cosmetic alternative to WORK. Neither keyword need be specified.
Refer to the LOCK statement for further information about locking tables inside a transaction.
Use COMMIT or ROLLBACK to terminate a transaction.
To begin a user transaction:
BEGIN WORK;
BEGIN is a Postgres language extension.
There is no explicit BEGIN WORK command in SQL92; transaction initiation is always implicit and it terminates either with a COMMIT or with a ROLLBACK statement.