Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
START TRANSACTION
Prev UpSQL CommandsHome Next

START TRANSACTION

START TRANSACTION — start a transaction block

Synopsis

START TRANSACTION [transaction_mode [, ...] ]wheretransaction_mode is one of:    ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }    READ WRITE | READ ONLY    [ NOT ] DEFERRABLE

Description

This command begins a new transaction block. If the isolation level, read/write mode, or deferrable mode is specified, the new transaction has those characteristics, as ifSET TRANSACTION was executed. This is the same as theBEGIN command.

Parameters

Refer toSET TRANSACTION for information on the meaning of the parameters to this statement.

Compatibility

In the standard, it is not necessary to issueSTART TRANSACTION to start a transaction block: any SQL command implicitly begins a block.PostgreSQL's behavior can be seen as implicitly issuing aCOMMIT after each command that does not followSTART TRANSACTION (orBEGIN), and it is therefore often calledautocommit. Other relational database systems might offer an autocommit feature as a convenience.

TheDEFERRABLEtransaction_mode is aPostgreSQL language extension.

The SQL standard requires commas between successivetransaction_modes, but for historical reasonsPostgreSQL allows the commas to be omitted.

See also the compatibility section ofSET TRANSACTION.


Prev Up Next
SHOW Home TRUNCATE
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp