aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-10-09 04:59:38 +0000
committerBruce Momjian <bruce@momjian.us>2002-10-09 04:59:38 +0000
commitd015dcbe4eeaebe6084983945ef68a642c38e0e1 (patch)
tree842dbc2a34f8d68a6fc47dfb0f6de539a0f401af /doc/src
parenteb949720adf5051b5fc1bd36735a2b35e72bad84 (diff)
downloadpostgresql-d015dcbe4eeaebe6084983945ef68a642c38e0e1.tar.gz
postgresql-d015dcbe4eeaebe6084983945ef68a642c38e0e1.zip
Have SET not start transaction when autocommit off, with doc updates.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/reset.sgml8
-rw-r--r--doc/src/sgml/ref/set.sgml8
-rw-r--r--doc/src/sgml/runtime.sgml38
3 files changed, 41 insertions, 13 deletions
diff --git a/doc/src/sgml/ref/reset.sgml b/doc/src/sgml/ref/reset.sgml
index 1af55703cd3..a21aa0239fb 100644
--- a/doc/src/sgml/ref/reset.sgml
+++ b/doc/src/sgml/ref/reset.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.15 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.16 2002/10/09 04:59:38 momjian Exp $
PostgreSQL documentation
-->
@@ -66,6 +66,12 @@ SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
switches, or per-database or per-user default settings. See the
<citetitle>Administrator's Guide</citetitle> for details.
</para>
+
+ <para>
+ See the <command>SHOW</> manual page for details on the transaction
+ behavior of <command>RESET</>.
+ </para>
+
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml
index bc3688a5652..1c9bd31e1e9 100644
--- a/doc/src/sgml/ref/set.sgml
+++ b/doc/src/sgml/ref/set.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.65 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.66 2002/10/09 04:59:38 momjian Exp $
PostgreSQL documentation
-->
@@ -109,6 +109,12 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</para>
<para>
+ 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.
+ </para>
+
+ <para>
Here are additional details about a few of the parameters that can be set:
<variablelist>
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index a7215c89ce0..2936e9b4c70 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.143 2002/10/03 02:26:49 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.144 2002/10/09 04:59:38 momjian Exp $
-->
<Chapter Id="runtime">
@@ -1235,16 +1235,32 @@ env PGOPTIONS='-c geqo=off' psql
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
- the effects of commands only on receiving an explicit
- <command>COMMIT</> command. This mode can also be thought of as
- implicitly issuing <command>BEGIN</> whenever a command is received
- and <productname>PostgreSQL</productname> is not already inside
- a transaction block.
- The default is true, for compatibility with historical
- <productname>PostgreSQL</productname> behavior. But for maximum
- compatibility with the SQL specification, set it to false.
- </para>
+ If set to false, <productname>PostgreSQL</productname> will
+ commit the commands only when 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>
+ 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
+ <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</>
+ first.
+ </para>
+ </note>
+
</listitem>
</varlistentry>