mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.122 2003/04/28 19:30:49 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.123 2003/05/14 03:25:58 tgl Exp $
|
||||
-->
|
||||
|
||||
<chapter id="libpq">
|
||||
@ -866,8 +866,13 @@ returned by the server.
|
||||
maintain the <structname>PGresult</structname> abstraction. Use the accessor functions below to get
|
||||
at the contents of <structname>PGresult</structname>. Avoid directly referencing the fields of the
|
||||
<structname>PGresult</structname> structure because they are subject to change in the future.
|
||||
If <quote>autocommit</quote> is on, multiple queries sent in a single
|
||||
function call are processed in a single transaction.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.23 2003/04/15 13:25:08 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.24 2003/05/14 03:26:00 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -98,12 +98,6 @@ BEGIN [ WORK | TRANSACTION ]
|
||||
<xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE">
|
||||
to terminate a transaction.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you turn the configuration parameter <varname>autocommit</> off,
|
||||
then <command>BEGIN</> is not required: any SQL command
|
||||
automatically starts a transaction.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.88 2003/03/25 16:15:43 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.89 2003/05/14 03:26:00 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -88,9 +88,11 @@ PostgreSQL documentation
|
||||
select * from foo;" | psql</literal>.
|
||||
</para>
|
||||
<para>
|
||||
If <quote>autocommit</quote> 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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.75 2003/05/04 02:23:16 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.76 2003/05/14 03:26:00 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -55,12 +55,6 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
|
||||
seen until the end of the transaction, but afterwards (if the transaction
|
||||
is committed) the <command>SET</command> value will take effect.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Even with <varname>autocommit</> set to <literal>off</>, <command>SET</>
|
||||
does not start a new transaction block. See the
|
||||
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.26 2003/05/04 02:23:16 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.27 2003/05/14 03:26:00 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -37,12 +37,6 @@ SHOW ALL
|
||||
<command>postmaster</command>. See <xref
|
||||
linkend="runtime-config"> for details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Even with <varname>autocommit</> set to <literal>off</>, <command>SHOW</>
|
||||
does not start a new transaction block. See the
|
||||
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.186 2003/03/21 01:58:04 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.187 2003/05/14 03:25:59 tgl Exp $
|
||||
-->
|
||||
|
||||
<appendix id="release">
|
||||
@ -24,6 +24,8 @@ CDATA means the content is "SGML-free", so you can write without
|
||||
worries about funny characters.
|
||||
-->
|
||||
<literallayout><![CDATA[
|
||||
New frontend/backend protocol supports many long-requested features
|
||||
SET AUTOCOMMIT TO OFF is no longer supported
|
||||
Reimplementation of NUMERIC datatype for more speed
|
||||
New regular expression package, many more regexp features (most of Perl5)
|
||||
Can now do EXPLAIN ... EXECUTE to see plan used for a prepared query
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.178 2003/05/04 02:23:16 petere Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.179 2003/05/14 03:26:00 tgl Exp $
|
||||
-->
|
||||
|
||||
<Chapter Id="runtime">
|
||||
@ -1289,56 +1289,6 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
<title>General Operation</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><varname>AUTOCOMMIT</varname> (<type>boolean</type>)</term>
|
||||
<indexterm><primary>autocommit</></>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to true, <productname>PostgreSQL</productname> will
|
||||
automatically do a <command>COMMIT</> after each successful command
|
||||
that is not inside an explicit transaction block (that is, unless a
|
||||
<command>BEGIN</> with no matching <command>COMMIT</> has been
|
||||
given).
|
||||
If set to false, <productname>PostgreSQL</productname> will
|
||||
commit only upon receiving an explicit
|
||||
<command>COMMIT</> command. This mode can also be thought of as
|
||||
implicitly issuing <command>BEGIN</> whenever a command is
|
||||
received that is not already inside a transaction block. The
|
||||
default is true, for compatibility with historical
|
||||
<productname>PostgreSQL</productname> behavior. However, for
|
||||
maximum compatibility with the SQL specification, set it to
|
||||
false.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Even with <varname>autocommit</> set to false, <command>SET</>,
|
||||
<command>SHOW</>, and <command>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 <command>SET</>, <command>SHOW</>, or
|
||||
<command>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
|
||||
<command>SET</>, <command>SHOW</>, or <command>RESET</>
|
||||
command at the start of a transaction block, use <command>BEGIN</>
|
||||
first.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
As of <productname>PostgreSQL</productname> 7.3, setting
|
||||
<varname>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.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>AUSTRALIAN_TIMEZONES</varname> (<type>boolean</type>)</term>
|
||||
<indexterm><primary>Australian time zones</></>
|
||||
|
Reference in New Issue
Block a user