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)]