AutoCommit documentation

[email protected] (Jonathan Pool)
Newsgroups perl.dbd.pg
Message-ID <[email protected]>
The current DBD::Pg manpage says that "According to the classification of DBI, PostgreSQL is a database in which a transaction must be explicitly started."

I find this statement confusing. Its most plausible interpretation implies that any statement changing the database is ineffective without either AutoCommit = 1 or a begin_work statement. But I find that with AutoCommit = 0 and no begin_work statement changes to a database are effective when a commit statement appears before the disconnection. Thus, it appears that DBD::Pg automatically issues a BEGIN after a connection when AutoCommit = 0. But I don't find anything in the documentation telling me that.

True, the DBI manpage says that for a database in which a transaction must be explicitly started "the driver will automatically begin an explicit transaction when 'AutoCommit' is turned off". But it isn't clear to me that setting AutoCommit to 0 as part of the connect statement is an instance of "turning off" AutoCommit. So I think it would be helpful to state explicitly that a begin_work statement after connection is unnecessary when AutoCommit = 0.
ˉ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.