From f85f43dfb5b9043ea6b01d8b824c195cd7f9ed3c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 14 May 2003 03:26:03 +0000 Subject: Backend support for autocommit removed, per recent discussions. The only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq. --- doc/src/sgml/libpq.sgml | 11 ++++++--- doc/src/sgml/ref/begin.sgml | 8 +------ doc/src/sgml/ref/psql-ref.sgml | 10 ++++---- doc/src/sgml/ref/set.sgml | 8 +------ doc/src/sgml/ref/show.sgml | 8 +------ doc/src/sgml/release.sgml | 4 +++- doc/src/sgml/runtime.sgml | 52 +----------------------------------------- 7 files changed, 21 insertions(+), 80 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index bff6f294f48..9bbf060c76e 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ @@ -866,8 +866,13 @@ returned by the server. maintain the PGresult abstraction. Use the accessor functions below to get at the contents of PGresult. Avoid directly referencing the fields of the PGresult structure because they are subject to change in the future. -If autocommit is on, multiple queries sent in a single -function call are processed in a single transaction. + + + +Multiple queries sent in a single +function call are processed in a single transaction, unless there are explicit +BEGIN/COMMIT commands included in the query string to divide it into multiple +transactions. diff --git a/doc/src/sgml/ref/begin.sgml b/doc/src/sgml/ref/begin.sgml index 1c5fe0f6ce8..7bd1309d289 100644 --- a/doc/src/sgml/ref/begin.sgml +++ b/doc/src/sgml/ref/begin.sgml @@ -1,5 +1,5 @@ @@ -98,12 +98,6 @@ BEGIN [ WORK | TRANSACTION ] to terminate a transaction. - - - If you turn the configuration parameter autocommit off, - then BEGIN is not required: any SQL command - automatically starts a transaction. - diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 49e4f998da0..8dd25d572e4 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1,5 +1,5 @@ @@ -88,9 +88,11 @@ PostgreSQL documentation select * from foo;" | psql. - If autocommit is on, multiple queries in a single - string are processed in a single transaction. - + If the command string contains multiple SQL commands, they are + processed in a single transaction, unless there are explicit + BEGIN/COMMIT commands included in the string to divide it into + multiple transactions. This is different from the behavior when + the same string is fed to psql's standard input. diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml index eba67d05775..170afd13dae 100644 --- a/doc/src/sgml/ref/set.sgml +++ b/doc/src/sgml/ref/set.sgml @@ -1,5 +1,5 @@ @@ -55,12 +55,6 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezoneSET value will take effect. - - - Even with autocommit set to off, SET - does not start a new transaction block. See the - autocommit section in for details. - diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml index dd8e9cf0412..0232d97dfce 100644 --- a/doc/src/sgml/ref/show.sgml +++ b/doc/src/sgml/ref/show.sgml @@ -1,5 +1,5 @@ @@ -37,12 +37,6 @@ SHOW ALL postmaster. See for details. - - - Even with autocommit set to off, SHOW - does not start a new transaction block. See the - autocommit section in for details. - diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index 654b8b53c08..9332ac499b4 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,5 +1,5 @@ @@ -24,6 +24,8 @@ CDATA means the content is "SGML-free", so you can write without worries about funny characters. --> @@ -1289,56 +1289,6 @@ SET ENABLE_SEQSCAN TO OFF; General Operation - - AUTOCOMMIT (boolean) - autocommit - - - If set to true, PostgreSQL will - automatically do a COMMIT after each successful command - that is not inside an explicit transaction block (that is, unless a - BEGIN with no matching COMMIT has been - given). - If set to false, PostgreSQL will - commit only upon receiving an explicit - COMMIT command. This mode can also be thought of as - implicitly issuing BEGIN whenever a command is - received that is not already inside a transaction block. The - default is true, for compatibility with historical - PostgreSQL behavior. However, for - maximum compatibility with the SQL specification, set it to - false. - - - - - Even with autocommit set to false, SET, - SHOW, and RESET do not start new - transaction blocks. They are run in their own transactions. - Once another command is issued, a transaction block - begins and any SET, SHOW, or - RESET commands are considered to be part of the - transaction, i.e., they are committed or rolled back depending - on the completion status of the transaction. To execute a - SET, SHOW, or RESET - command at the start of a transaction block, use BEGIN - first. - - - - - - As of PostgreSQL 7.3, setting - autocommit to false is not well-supported. - This is a new feature and is not yet handled by all client - libraries and applications. Before making it the default - setting in your installation, test carefully. - - - - - - AUSTRALIAN_TIMEZONES (boolean) Australian time zones -- cgit v1.2.3