Postgresql 中文操作指南

END

END — 提交当前事务

END — commit the current transaction

Synopsis

END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]

Description

END 提交当前事务。由事务所做的所有更改对其他人都会可见,并且如果系统崩溃,则保证这些更改持久有效。此命令是等效于 COMMIT 的 PostgreSQL 扩展。

END commits the current transaction. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs. This command is a PostgreSQL extension that is equivalent to COMMIT.

Parameters

  • WORK__TRANSACTION

    • Optional key words. They have no effect.

  • AND CHAIN

    • If AND CHAIN is specified, a new transaction is immediately started with the same transaction characteristics (see SET TRANSACTION) as the just finished one. Otherwise, no new transaction is started.

Notes

使用 ROLLBACK 来中止事务。

Use ROLLBACK to abort a transaction.

当不在事务中时,发出 END 不会造成任何损害,但它会引发一条警告消息。

Issuing END when not inside a transaction does no harm, but it will provoke a warning message.

Examples

若要提交当前事务并使所有更改永久化:

To commit the current transaction and make all changes permanent:

END;

Compatibility

END 是一项 PostgreSQL 扩展,它提供与 COMMIT 等效的功能,而 COMMIT 已在 SQL 标准中指定。

END is a PostgreSQL extension that provides functionality equivalent to COMMIT, which is specified in the SQL standard.

See Also