成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

SET TRANSACTION 中文man頁(yè)面

系統(tǒng)
SET TRANSACTION 命令為當(dāng)前事務(wù)設(shè)置特性。 它對(duì)后面的事務(wù)沒(méi)有影響。 SET SESSION CHARACTERISTICS 為一個(gè)會(huì)話中的每個(gè)事務(wù)設(shè)置缺省的隔離級(jí)別。 SET TRANSACTION 可以為一個(gè)獨(dú)立的事務(wù)覆蓋上面的設(shè)置。

NAME

SET TRANSACTION - 設(shè)置當(dāng)前事務(wù)的特性

SYNOPSIS

SET TRANSACTION
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
SET SESSION CHARACTERISTICS AS TRANSACTION
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]

DESCRIPTION 描述

SET TRANSACTION 命令為當(dāng)前事務(wù)設(shè)置特性。 它對(duì)后面的事務(wù)沒(méi)有影響。 SET SESSION CHARACTERISTICS 為一個(gè)會(huì)話中的每個(gè)事務(wù)設(shè)置缺省的隔離級(jí)別。 SET TRANSACTION 可以為一個(gè)獨(dú)立的事務(wù)覆蓋上面的設(shè)置。


 可用的事務(wù)特性是事務(wù)隔離級(jí)別和事務(wù)訪問(wèn)模式(讀/寫或者只讀)。


 事務(wù)的隔離級(jí)別決定一個(gè)事務(wù)在同時(shí)存在其它并行運(yùn)行的事務(wù)時(shí)它能夠看到什么數(shù)據(jù)。

READ COMMITTED

 一條語(yǔ)句只能看到在它開(kāi)始之前的數(shù)據(jù)。這是缺省。
SERIALIZABLE

 當(dāng)前的事務(wù)只能看到在這次事務(wù)第一條查詢或者修改數(shù)據(jù)的語(yǔ)句執(zhí)行之前的數(shù)據(jù)。
Tip: 提示: 說(shuō)白了,serializable(可串行化)意味著兩個(gè)事務(wù)將把數(shù)據(jù)庫(kù)保持在同一個(gè)狀態(tài), 就好象這兩個(gè)事務(wù)是嚴(yán)格地按照先后順序執(zhí)行地那樣。


 事務(wù)隔離級(jí)別在事務(wù)中第一個(gè)數(shù)據(jù)修改語(yǔ)句 (SELECT, INSERT, DELETE, UPDATE, FETCH, COPY) 執(zhí)行之后就不能再次設(shè)置。 參閱 Chapter 12 ``Concurrency Control'' 獲取有關(guān)事務(wù)隔離級(jí)別和并發(fā)性控制的更多信息。


 事務(wù)訪問(wèn)模式?jīng)Q定事務(wù)是讀/寫還是只讀。讀/寫是缺省。如果一個(gè) 事務(wù)是只讀,而且寫入的表不是臨時(shí)表,那么下面的 SQL 命令是不允許的:INSERT, UPDATE,DELETE,和 COPY TO; 而所有的 CREATE,ALTER,和 DROP 命令; COMMENT,GRANT,REVOKE, TRUNCATE;和 EXPLAIN ANALYZE 和EXECUTE 都不允許。這是一個(gè)高層次的只讀概念,它并不阻止對(duì)磁盤的寫入。  

NOTES 注意


 會(huì)話的缺省事務(wù)隔離級(jí)別也可以用命令

SET default_transaction_isolation = 'value'


 以及在配置文件里設(shè)置。 參考 Section 16.4 ``Run-time Configuration'' 獲取更多信息。  

COMPATIBILITY 兼容性


 兩個(gè)命令都在 SQL 標(biāo)準(zhǔn)里定義了。SQL 里的缺省事務(wù)隔離級(jí)別是 SERIALIZABLE; 在 PostgreSQL 里,缺省隔離級(jí)別是 READ COMMITED,但是你可以用上面的描述修改它。 PostgreSQL 并沒(méi)有提供隔離級(jí)別 READ UNCOMMITTED 和 REPEATABLE READ。 因?yàn)槎喟姹静l(fā)控制,SERIALIZABLE 級(jí)別并非真正的可串行化。參閱 Chapter 12 ``Concurrency Control'' 獲取細(xì)節(jié)。


 在 SQL 標(biāo)準(zhǔn)里還有另外一種事務(wù)特性可以用這些命令設(shè)置:診斷范圍的大小。這個(gè)概念只用于嵌入的 SQL。

#p#

NAME

SET TRANSACTION - set the characteristics of the current transaction

SYNOPSIS

SET TRANSACTION
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
SET SESSION CHARACTERISTICS AS TRANSACTION
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]

DESCRIPTION

The SET TRANSACTION command sets the transaction characteristics of the current transaction. It has no effect on any subsequent transactions. SET SESSION CHARACTERISTICS sets the default transaction characteristics for each transaction of a session. SET TRANSACTION can override it for an individual transaction.

The available transaction characteristics are the transaction isolation level and the transaction access mode (read/write or read-only).

The isolation level of a transaction determines what data the transaction can see when other transactions are running concurrently.

READ COMMITTED
A statement can only see rows committed before it began. This is the default.
SERIALIZABLE
The current transaction can only see rows committed before first query or data-modification statement was executed in this transaction.
Tip: Intuitively, serializable means that two concurrent transactions will leave the database in the same state as if the two has been executed strictly after one another in either order.

The transaction isolation level cannot be set after the first query or data-modification statement (SELECT, INSERT, DELETE, UPDATE, FETCH, COPY) of a transaction has been executed. See the chapter called ``Concurrency Control'' in the documentation for more information about transaction isolation and concurrency control.

The transaction access mode determines whether the transaction is read/write or read-only. Read/write is the default. When a transaction is read-only, the following SQL commands are disallowed: INSERT, UPDATE, DELETE, and COPY TO if the table they would write to is not a temporary table; all CREATE, ALTER, and DROP commands; COMMENT, GRANT, REVOKE, TRUNCATE; and EXPLAIN ANALYZE and EXECUTE if the command they would execute is among those listed. This is a high-level notion of read-only that does not prevent writes to disk.  

NOTES

The session default transaction isolation level can also be set with the command

SET default_transaction_isolation = 'value'

and in the configuration file. Consult the section called ``Run-time Configuration'' in the documentation for more information.  

COMPATIBILITY

Both commands are defined in the SQL standard. SERIALIZABLE is the default transaction isolation level in the standard; in PostgreSQL the default is ordinarily READ COMMITTED, but you can change it as described above. PostgreSQL does not provide the isolation levels READ UNCOMMITTED and REPEATABLE READ. Because of multiversion concurrency control, the SERIALIZABLE level is not truly serializable. See the chapter called ``Concurrency Control'' in the documentation for details.

In the SQL standard, there is one other transaction characteristic that can be set with these commands: the size of the diagnostics area. This concept is only for use in embedded SQL.

責(zé)任編輯:韓亞珊 來(lái)源: CMPP.net
相關(guān)推薦

2011-08-24 18:19:13

START TRANS中文man

2011-08-24 17:50:19

SET中文man

2011-08-24 17:53:08

SET CONSTRA中文man

2011-08-24 17:58:08

SET SESSION中文man

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-11 15:28:43

ali中文man

2011-08-11 16:31:49

biff中文man

2011-08-11 17:16:43

cce中文man

2011-08-11 18:05:04

chvt中文man

2011-08-11 18:13:07

clear中文man

2011-08-12 09:13:02

df中文man

2011-08-12 09:38:06

dircolors中文man

2011-08-12 09:44:37

dirname中文man

2011-08-12 10:20:02

echo中文man

2011-08-12 10:25:55

eject中文man

2011-08-12 11:07:19

git中文man
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 2020国产在线 | 一区二区在线不卡 | 亚洲日韩中文字幕一区 | 精品久久久久一区 | 日韩激情网 | 欧美日韩国产一区二区 | 日韩三级免费网站 | 三a毛片 | 亚洲国产精品网站 | 久久久久久国产 | 国产精品一卡二卡三卡 | 亚洲人成人一区二区在线观看 | 国产精品一区二区三区在线播放 | 久久成人高清视频 | 国产第二页 | 亚洲国产精品久久久久婷婷老年 | 成人国产一区二区三区精品麻豆 | 成年人精品视频 | 天天射天天干 | 欧美久久久网站 | 久久高清 | 久久久久久成人 | 亚洲免费成人 | 国产精品揄拍一区二区 | 99亚洲 | 龙珠z在线观看 | 精品久久久久久亚洲精品 | 干狠狠| 奇米久久| 久久久久久高潮国产精品视 | 黑人巨大精品欧美一区二区一视频 | 99精品一区二区 | 亚洲精色 | 亚洲电影第1页 | 国产精品电影在线观看 | 日本在线一区二区 | 亚洲精品成人在线 | 国产激情精品视频 | 日韩欧美精品一区 | 国产成人综合一区二区三区 | 一级特黄a大片 |