1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Make SET really not start a transaction.

This commit is contained in:
Tom Lane
2002-10-13 16:55:05 +00:00
parent 5261bf9733
commit ad4ce7aa5b
5 changed files with 40 additions and 41 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.16 2002/10/09 04:59:38 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.17 2002/10/13 16:55:05 tgl Exp $
PostgreSQL documentation
-->
@ -68,7 +68,7 @@ SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
</para>
<para>
See the <command>SHOW</> manual page for details on the transaction
See the <command>SET</> manual page for details on the transaction
behavior of <command>RESET</>.
</para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.67 2002/10/09 16:27:48 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.68 2002/10/13 16:55:05 tgl Exp $
PostgreSQL documentation
-->
@ -109,9 +109,10 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</para>
<para>
With <literal>autocommit</> set to <literal>off</>, <command>SET</>
Even with <literal>autocommit</> set to <literal>off</>, <command>SET</>
does not start a new transaction block. See the
<literal>autocommit</> section of the documentation for details.
<literal>autocommit</> section of the <citetitle>Administrator's
Guide</citetitle> for details.
</para>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.21 2002/09/01 01:59:48 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.22 2002/10/13 16:55:05 tgl Exp $
PostgreSQL documentation
-->
@ -60,6 +60,13 @@ SHOW ALL
command-line flag when starting the
<application>postmaster</application>.
</para>
<para>
Even with <literal>autocommit</> set to <literal>off</>, <command>SHOW</>
does not start a new transaction block. See the
<literal>autocommit</> section of the <citetitle>Administrator's
Guide</citetitle> for details.
</para>
</refsect1>
<refsect1>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.144 2002/10/09 04:59:38 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.145 2002/10/13 16:55:05 tgl Exp $
-->
<Chapter Id="runtime">
@ -1236,7 +1236,7 @@ env PGOPTIONS='-c geqo=off' psql
<command>BEGIN</> with no matching <command>COMMIT</> has been
given).
If set to false, <productname>PostgreSQL</productname> will
commit the commands only when receiving an explicit
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
@ -1247,16 +1247,16 @@ env PGOPTIONS='-c geqo=off' psql
</para>
<note>
<para>
With <varname>autocommit</> set to false, <command>SET</>,
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, multi-statement transaction
behavior begins and any <command>SET</>, <command>SHOW</>, or
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 have
<command>SET</>, <command>SHOW</>, and <command>RESET</>
commands at the start of a transaction, use <command>BEGIN</>
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>