ABORT 中文man頁(yè)面
NAME
ABORT - 退出當(dāng)前事務(wù)
SYNOPSIS
ABORT [ WORK | TRANSACTION ]
DESCRIPTION 描述
ABORT 回卷當(dāng)前事務(wù)并且廢棄所有當(dāng)前事務(wù)中做的更新。 這個(gè)命令和 SQL 命令 ROLLBACK [rollback(7)], 的行為完全一樣, 只是由于歷史原因而保留下來。
PARAMETERS 參數(shù)
- WORK
- TRANSACTION
可選的關(guān)鍵字,它們沒有什么影響。
NOTES 注意
使用 COMMIT [commit(7)] to 成功地中止一個(gè)事務(wù)。
如果不在事務(wù)內(nèi)部發(fā)出 ABORT 不會(huì)有問題,但是會(huì)產(chǎn)生一個(gè)警告信息。
EXAMPLES 例子
退出全部變更:
ABORT;
COMPATIBILITY 兼容性
此命令是 PostgreSQL 基于歷史原因做的擴(kuò)展。 ROLLBACK 是 SQL 中等價(jià)的命令。
SEE ALSO 參見
BEGIN [begin(7)], COMMIT [commit(l)], ROLLBACK [rollback(l)]
#p#
NAME
ABORT - abort the current transaction
SYNOPSIS
ABORT [ WORK | TRANSACTION ]
DESCRIPTION
ABORT rolls back the current transaction and causes all the updates made by the transaction to be discarded. This command is identical in behavior to the standard SQL command ROLLBACK [rollback(7)], and is present only for historical reasons.
PARAMETERS
- WORK
- TRANSACTION
- Optional key words. They have no effect.
NOTES
Use COMMIT [commit(7)] to successfully terminate a transaction.
Issuing ABORT when not inside a transaction does no harm, but it will provoke a warning message.
EXAMPLES
To abort all changes:
ABORT;
COMPATIBILITY
This command is a PostgreSQL extension present for historical reasons. ROLLBACK is the equivalent standard SQL command.
SEE ALSO
BEGIN [begin(7)], COMMIT [commit(l)], ROLLBACK [rollback(l)]

















