ABORT 中文man頁面
NAME
ABORT - 退出當前事務
SYNOPSIS
ABORT [ WORK | TRANSACTION ]
DESCRIPTION 描述
ABORT 回卷當前事務并且廢棄所有當前事務中做的更新。 這個命令和 SQL 命令 ROLLBACK [rollback(7)], 的行為完全一樣, 只是由于歷史原因而保留下來。
PARAMETERS 參數
- WORK
- TRANSACTION
可選的關鍵字,它們沒有什么影響。
NOTES 注意
使用 COMMIT [commit(7)] to 成功地中止一個事務。
如果不在事務內部發出 ABORT 不會有問題,但是會產生一個警告信息。
EXAMPLES 例子
退出全部變更:
ABORT;
COMPATIBILITY 兼容性
此命令是 PostgreSQL 基于歷史原因做的擴展。 ROLLBACK 是 SQL 中等價的命令。
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)]

















