Postgresql 中文操作指南

SET AUTOCOMMIT

SET AUTOCOMMIT — 设置当前会话的自动提交行为

SET AUTOCOMMIT — set the autocommit behavior of the current session

Synopsis

SET AUTOCOMMIT { = | TO } { ON | OFF }

Description

SET AUTOCOMMIT 设置当前数据库会话的自动提交行为。默认情况下,嵌入式 SQL 程序在自动提交模式下运行 not ,所以当需要时 COMMIT 需要明确地发布。此命令可以将会话更改为自动提交模式,在该模式下,每个单独的语句都将隐式提交。

SET AUTOCOMMIT sets the autocommit behavior of the current database session. By default, embedded SQL programs are not in autocommit mode, so COMMIT needs to be issued explicitly when desired. This command can change the session to autocommit mode, where each individual statement is committed implicitly.

Compatibility

SET AUTOCOMMIT 是 PostgreSQL ECPG 的扩展。

SET AUTOCOMMIT is an extension of PostgreSQL ECPG.