head	1.28;
access;
symbols
	REL9_0_0:1.28
	REL9_1_ALPHA1:1.28
	REL9_0_RC1:1.28
	REL9_0_BETA4:1.28
	REL9_0_STABLE:1.28.0.2
	REL9_0_BETA3:1.28
	REL9_0_BETA2:1.28
	REL7_4_29:1.17.2.1
	REL8_0_25:1.23.4.1
	REL8_1_21:1.23.6.1
	REL8_2_17:1.25
	REL8_3_11:1.25
	REL8_4_4:1.26
	REL9_0_BETA1:1.28
	REL9_0_ALPHA5_BRANCH:1.27.0.8
	REL9_0_ALPHA5:1.27
	REL7_4_28:1.17.2.1
	REL8_0_24:1.23.4.1
	REL8_1_20:1.23.6.1
	REL8_2_16:1.25
	REL8_3_10:1.25
	REL8_4_3:1.26
	REL9_0_ALPHA4:1.27
	REL9_0_ALPHA4_BRANCH:1.27.0.6
	REL8_5_ALPHA3:1.27
	REL8_5_ALPHA3_BRANCH:1.27.0.4
	REL7_4_27:1.17.2.1
	REL8_0_23:1.23.4.1
	REL8_1_19:1.23.6.1
	REL8_2_15:1.25
	REL8_3_9:1.25
	REL8_4_2:1.26
	REL8_5_ALPHA2:1.27
	REL8_5_ALPHA2_BRANCH:1.27.0.2
	REL7_4_26:1.17.2.1
	REL8_0_22:1.23.4.1
	REL8_1_18:1.23.6.1
	REL8_2_14:1.25
	REL8_3_8:1.25
	REL8_4_1:1.26
	REL8_5_ALPHA1:1.26
	REL8_5_ALPHA1_BRANCH:1.26.0.4
	REL8_4_STABLE:1.26.0.2
	REL8_4_0:1.26
	REL8_4_RC2:1.26
	REL8_4_RC1:1.26
	REL8_4_BETA2:1.26
	REL8_4_BETA1:1.26
	REL7_4_25:1.17.2.1
	REL8_0_21:1.23.4.1
	REL8_1_17:1.23.6.1
	REL8_2_13:1.25
	REL8_3_7:1.25
	REL7_4_24:1.17.2.1
	REL8_0_20:1.23.4.1
	REL8_1_16:1.23.6.1
	REL8_2_12:1.25
	REL8_3_6:1.25
	REL7_4_23:1.17.2.1
	REL8_0_19:1.23.4.1
	REL8_1_15:1.23.6.1
	REL8_2_11:1.25
	REL8_3_5:1.25
	REL7_4_22:1.17.2.1
	REL8_0_18:1.23.4.1
	REL8_1_14:1.23.6.1
	REL8_2_10:1.25
	REL8_3_4:1.25
	REL7_4_21:1.17.2.1
	REL8_0_17:1.23.4.1
	REL8_1_13:1.23.6.1
	REL8_2_9:1.25
	REL8_3_3:1.25
	REL7_4_20:1.17.2.1
	REL8_0_16:1.23.4.1
	REL8_1_12:1.23.6.1
	REL8_2_8:1.25
	REL8_3_2:1.25
	REL8_2_7:1.25
	REL8_3_1:1.25
	REL8_3_STABLE:1.25.0.4
	REL8_3_0:1.25
	REL8_3_RC2:1.25
	REL7_3_21:1.9
	REL7_4_19:1.17.2.1
	REL8_0_15:1.23.4.1
	REL8_1_11:1.23.6.1
	REL8_2_6:1.25
	REL8_3_RC1:1.25
	REL8_3_BETA4:1.25
	REL8_3_BETA3:1.25
	REL8_3_BETA2:1.25
	REL8_3_BETA1:1.25
	REL7_3_20:1.9
	REL7_4_18:1.17.2.1
	REL8_0_14:1.23.4.1
	REL8_1_10:1.23.6.1
	REL8_2_5:1.25
	REL7_3_19:1.9
	REL7_4_17:1.17.2.1
	REL8_0_13:1.23.4.1
	REL8_1_9:1.23.6.1
	REL8_2_4:1.25
	REL8_0_12:1.23.4.1
	REL8_1_8:1.23.6.1
	REL8_2_3:1.25
	REL7_3_18:1.9
	REL7_4_16:1.17.2.1
	REL8_0_11:1.23.4.1
	REL8_1_7:1.23.6.1
	REL8_2_2:1.25
	REL8_0_10:1.23.4.1
	REL8_1_6:1.23.6.1
	REL8_2_1:1.25
	REL7_4_15:1.17.2.1
	REL7_3_17:1.9
	REL8_2_STABLE:1.25.0.2
	REL8_2_0:1.25
	REL8_2_RC1:1.25
	REL8_2_BETA3:1.25
	REL8_2_BETA2:1.25
	REL8_1_5:1.23.6.1
	REL8_0_9:1.23.4.1
	REL7_4_14:1.17.2.1
	REL7_3_16:1.9
	REL8_2_BETA1:1.25
	REL7_3_15:1.9
	REL7_4_13:1.17
	REL8_0_8:1.23
	REL8_1_4:1.23
	REL7_3_14:1.9
	REL7_4_12:1.17
	REL8_0_7:1.23
	REL8_1_3:1.23
	REL7_3_13:1.9
	REL7_4_11:1.17
	REL8_0_6:1.23
	REL8_1_2:1.23
	REL7_3_12:1.9
	REL7_4_10:1.17
	REL8_0_5:1.23
	REL8_1_1:1.23
	REL8_1_STABLE:1.23.0.6
	REL8_1_0:1.23
	REL8_1_0RC1:1.23
	REL8_1_0BETA4:1.23
	REL8_1_0BETA3:1.23
	REL7_3_11:1.9
	REL7_4_9:1.17
	REL8_0_4:1.23
	REL8_1_0BETA2:1.23
	REL8_1_0BETA1:1.23
	REL7_2_8:1.8
	REL7_3_10:1.9
	REL7_4_8:1.17
	REL8_0_3:1.23
	REL8_0_2:1.23
	REL7_2_7:1.8
	REL7_3_9:1.9
	REL7_4_7:1.17
	REL8_0_1:1.23
	REL8_0_STABLE:1.23.0.4
	REL8_0_0:1.23.0.2
	REL8_0_0RC5:1.23
	REL8_0_0RC4:1.23
	REL8_0_0RC3:1.23
	REL8_0_0RC2:1.23
	REL8_0_0RC1:1.23
	REL8_0_0BETA5:1.23
	REL8_0_0BETA4:1.23
	REL7_4_6:1.17
	REL7_3_8:1.9
	REL7_2_6:1.8
	REL8_0_0BETA3:1.23
	REL8_0_0BETA2:1.21
	REL7_2_5:1.8
	REL7_4_5:1.17
	REL7_3_7:1.9
	REL7_4_4:1.17
	REL8_0_0BETA1:1.19
	REL7_4_3:1.17
	REL7_4_2:1.17
	REL7_3_6:1.9
	REL7_4_1:1.17
	REL7_3_5:1.9
	REL7_4:1.17
	REL7_4_RC2:1.17
	REL7_4_STABLE:1.17.0.2
	REL7_4_RC1:1.17
	REL7_4_BETA5:1.17
	REL7_4_BETA4:1.17
	REL7_4_BETA3:1.17
	REL7_4_BETA2:1.14
	WIN32_DEV:1.14.0.2
	REL7_4_BETA1:1.14
	REL7_3_4:1.9
	REL7_3_2:1.9
	REL7_2_4:1.8
	REL7_3_STABLE:1.9.0.2
	REL7_2_3:1.8
	REL7_2_STABLE:1.8.0.2
	REL7_2:1.8
	REL7_2_RC2:1.8
	REL7_2_RC1:1.8
	REL7_2_BETA5:1.7
	REL7_2_BETA4:1.7
	REL7_2_BETA3:1.6
	REL7_2_BETA2:1.6
	REL7_2_BETA1:1.6
	REL7_1_2:1.3
	REL7_1_STABLE:1.3.0.2
	REL7_1_BETA:1.3
	REL7_1_BETA3:1.3
	REL7_1_BETA2:1.3
	REL7_1:1.3;
locks; strict;
comment	@# @;


1.28
date	2010.04.03.07.23.02;	author petere;	state Exp;
branches;
next	1.27;

1.27
date	2009.09.18.05.00.42;	author petere;	state Exp;
branches;
next	1.26;

1.26
date	2008.11.14.10.22.47;	author petere;	state Exp;
branches;
next	1.25;

1.25
date	2006.09.16.00.30.20;	author momjian;	state Exp;
branches;
next	1.24;

1.24
date	2006.07.31.01.10.56;	author alvherre;	state Exp;
branches;
next	1.23;

1.23
date	2004.09.26.23.48.07;	author neilc;	state Exp;
branches
	1.23.4.1
	1.23.6.1;
next	1.22;

1.22
date	2004.09.20.00.04.19;	author neilc;	state Exp;
branches;
next	1.21;

1.21
date	2004.08.14.22.17.08;	author tgl;	state Exp;
branches;
next	1.20;

1.20
date	2004.08.12.21.00.22;	author tgl;	state Exp;
branches;
next	1.19;

1.19
date	2003.11.29.19.51.39;	author pgsql;	state Exp;
branches;
next	1.18;

1.18
date	2003.11.06.22.08.14;	author petere;	state Exp;
branches;
next	1.17;

1.17
date	2003.09.11.21.42.20;	author momjian;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2003.09.09.18.28.53;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2003.08.31.17.32.24;	author petere;	state Exp;
branches;
next	1.14;

1.14
date	2003.05.04.02.23.16;	author petere;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2003.03.25.16.15.44;	author petere;	state Exp;
branches;
next	1.12;

1.12
date	2003.01.19.00.13.31;	author momjian;	state Exp;
branches;
next	1.11;

1.11
date	2003.01.11.00.00.03;	author petere;	state Exp;
branches;
next	1.10;

1.10
date	2003.01.10.22.03.27;	author petere;	state Exp;
branches;
next	1.9;

1.9
date	2002.08.04.04.31.44;	author momjian;	state Exp;
branches;
next	1.8;

1.8
date	2002.01.20.22.19.57;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2001.12.08.03.24.39;	author thomas;	state Exp;
branches;
next	1.6;

1.6
date	2001.10.09.18.46.00;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2001.09.03.12.57.50;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2001.06.30.22.03.25;	author petere;	state Exp;
branches;
next	1.3;

1.3
date	2000.11.24.20.16.38;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.07.14.15.27.14;	author thomas;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.18.21.24.54;	author petere;	state Exp;
branches;
next	;

1.14.2.1
date	2003.09.07.04.36.46;	author momjian;	state Exp;
branches;
next	;

1.17.2.1
date	2006.07.31.01.09.52;	author alvherre;	state Exp;
branches;
next	;

1.23.4.1
date	2006.07.31.01.09.48;	author alvherre;	state Exp;
branches;
next	;

1.23.6.1
date	2006.07.31.01.13.58;	author alvherre;	state Exp;
branches;
next	;


desc
@@


1.28
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.27 2009/09/18 05:00:42 petere Exp $ -->
<refentry id="SQL-SET-TRANSACTION">
 <refmeta>
  <refentrytitle>SET TRANSACTION</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>SET TRANSACTION</refname>
  <refpurpose>set the characteristics of the current transaction</refpurpose>
 </refnamediv>

 <indexterm zone="sql-set-transaction">
  <primary>SET TRANSACTION</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
SET TRANSACTION <replaceable class="parameter">transaction_mode</replaceable> [, ...]
SET SESSION CHARACTERISTICS AS TRANSACTION <replaceable class="parameter">transaction_mode</replaceable> [, ...]

<phrase>where <replaceable class="parameter">transaction_mode</replaceable> is one of:</phrase>

    ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
    READ WRITE | READ ONLY
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   The <command>SET TRANSACTION</command> command sets the
   characteristics of the current transaction. It has no effect on any
   subsequent transactions.  <command>SET SESSION
   CHARACTERISTICS</command> sets the default transaction
   characteristics for subsequent transactions of a session.  These
   defaults can be overridden by <command>SET TRANSACTION</command>
   for an individual transaction.
  </para>

  <para>
   The available transaction characteristics are the transaction
   isolation level and the transaction access mode (read/write or
   read-only).
  </para>

  <para>
   The isolation level of a transaction determines what data the
   transaction can see when other transactions are running concurrently:

   <variablelist>
    <varlistentry>
     <term><literal>READ COMMITTED</literal></term>
     <listitem>
      <para>
       A statement can only see rows committed before it began. This
       is the default.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><literal>SERIALIZABLE</literal></term>
     <listitem>
      <para>
       All statements of the current transaction can only see rows committed
       before the first query or data-modification statement was executed in
       this transaction.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>

   The SQL standard defines two additional levels, <literal>READ
   UNCOMMITTED</literal> and <literal>REPEATABLE READ</literal>.
   In <productname>PostgreSQL</productname> <literal>READ
   UNCOMMITTED</literal> is treated as
   <literal>READ COMMITTED</literal>, while <literal>REPEATABLE
   READ</literal> is treated as <literal>SERIALIZABLE</literal>.
  </para>

  <para>
   The transaction isolation level cannot be changed after the first query or
   data-modification statement (<command>SELECT</command>,
   <command>INSERT</command>, <command>DELETE</command>,
   <command>UPDATE</command>, <command>FETCH</command>, or
   <command>COPY</command>) of a transaction has been executed.  See
   <xref linkend="mvcc"> for more information about transaction
   isolation and concurrency control.
  </para>

  <para>
   The transaction access mode determines whether the transaction is
   read/write or read-only.  Read/write is the default.  When a
   transaction is read-only, the following SQL commands are
   disallowed: <literal>INSERT</literal>, <literal>UPDATE</literal>,
   <literal>DELETE</literal>, and <literal>COPY FROM</literal> if the
   table they would write to is not a temporary table; all
   <literal>CREATE</literal>, <literal>ALTER</literal>, and
   <literal>DROP</literal> commands; <literal>COMMENT</literal>,
   <literal>GRANT</literal>, <literal>REVOKE</literal>,
   <literal>TRUNCATE</literal>; and <literal>EXPLAIN ANALYZE</literal>
   and <literal>EXECUTE</literal> if the command they would execute is
   among those listed.  This is a high-level notion of read-only that
   does not prevent all writes to disk.
  </para>
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   If <command>SET TRANSACTION</command> is executed without a prior
   <command>START TRANSACTION</command> or  <command>BEGIN</command>,
   it will appear to have no effect, since the transaction will immediately
   end.
  </para>

  <para>
   It is possible to dispense with <command>SET TRANSACTION</command>
   by instead specifying the desired <replaceable
   class="parameter">transaction_modes</replaceable> in
   <command>BEGIN</command> or <command>START TRANSACTION</command>.
  </para>

  <para>
   The session default transaction modes can also be set by setting the
   configuration parameters <xref linkend="guc-default-transaction-isolation">
   and <xref linkend="guc-default-transaction-read-only">.
   (In fact <command>SET SESSION CHARACTERISTICS</command> is just a
   verbose equivalent for setting these variables with <command>SET</>.)
   This means the defaults can be set in the configuration file, via
   <command>ALTER DATABASE</>, etc.  Consult <xref linkend="runtime-config">
   for more information.
  </para>
 </refsect1>

 <refsect1 id="R1-SQL-SET-TRANSACTION-3">
  <title>Compatibility</title>

  <para>
   Both commands are defined in the <acronym>SQL</acronym> standard.
   <literal>SERIALIZABLE</literal> is the default transaction
   isolation level in the standard.  In
   <productname>PostgreSQL</productname> the default is ordinarily
   <literal>READ COMMITTED</literal>, but you can change it as
   mentioned above.  Because of lack of predicate locking, the
   <literal>SERIALIZABLE</literal> level is not truly
   serializable. See <xref linkend="mvcc"> for details.
  </para>

  <para>
   In the SQL standard, there is one other transaction characteristic
   that can be set with these commands: the size of the diagnostics
   area.  This concept is specific to embedded SQL, and therefore is
   not implemented in the <productname>PostgreSQL</productname> server.
  </para>

  <para>
   The SQL standard requires commas between successive <replaceable
   class="parameter">transaction_modes</replaceable>, but for historical
   reasons <productname>PostgreSQL</productname> allows the commas to be
   omitted.
  </para>
 </refsect1>
</refentry>
@


1.27
log
@Easier to translate psql help

Instead of requiring translators to translate the entire SQL command
synopses, change create_help.pl to only require them to translate the
placeholders, and paste those into the synopsis using a printf mechanism.
Make some small updates to the markup to make it easier to parse.

Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
msgmerge usually only runs on babel.postgresql.org, however.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.26 2008/11/14 10:22:47 petere Exp $ -->
d4 1
a4 1
  <refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
@


1.26
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.25 2006/09/16 00:30:20 momjian Exp $ -->
d23 1
a23 1
where <replaceable class="parameter">transaction_mode</replaceable> is one of:
@


1.25
log
@Remove emacs info from footer of SGML files.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.24 2006/07/31 01:10:56 alvherre Exp $ -->
d5 1
@


1.24
log
@Fix confusion between COPY FROM and COPY TO, per Gavin Sharry and Arul Shaji.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.23 2004/09/26 23:48:07 neilc Exp $ -->
a167 17

<!-- Keep this comment at the end of the file
Local variables:
mode:sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:("/usr/lib/sgml/catalog")
sgml-local-ecat-files:nil
End:
-->
@


1.23
log
@Fix misstatement in docs: CREATE TABLE AS is now part of the standard.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.22 2004/09/20 00:04:19 neilc Exp $ -->
d98 1
a98 1
   <literal>DELETE</literal>, and <literal>COPY TO</literal> if the
@


1.23.6.1
log
@Fix confusion between COPY FROM and COPY TO, per Gavin Sharry and Arul Shaji.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.23 2004/09/26 23:48:07 neilc Exp $ -->
d98 1
a98 1
   <literal>DELETE</literal>, and <literal>COPY FROM</literal> if the
@


1.23.4.1
log
@Fix confusion between COPY FROM and COPY TO, per Gavin Sharry and Arul Shaji.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.23 2004/09/26 23:48:07 neilc Exp $ -->
d98 1
a98 1
   <literal>DELETE</literal>, and <literal>COPY FROM</literal> if the
@


1.22
log
@Minor documentation cleanup and improvement.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.21 2004/08/14 22:17:08 tgl Exp $ -->
d121 2
a122 2
   It is possible to dispense with <command>SET TRANSACTION</command> by
   instead specifying the desired <replaceable
d124 1
a124 1
   <command>START TRANSACTION</command>.
@


1.21
log
@Minor editorializing.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.20 2004/08/12 21:00:22 tgl Exp $ -->
d33 1
a33 1
   The <command>SET TRANSACTION</command> command sets the transaction
d38 2
a39 2
   defaults can be overridden by <command>SET TRANSACTION</command> for an
   individual transaction.
@


1.20
log
@Allow commas in BEGIN, START TRANSACTION, and SET TRANSACTION, as required
by the SQL standard.  For backwards compatibility, however, continue to
accept the syntax without.  Minor editorialization in the reference pages
for these commands, too.
@
text
@d1 1
a1 1
<!-- $PostgreSQL: pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.19 2003/11/29 19:51:39 pgsql Exp $ -->
d37 3
a39 3
   characteristics for subsequent transactions of a session.  <command>SET
   TRANSACTION</command> can override it for an individual
   transaction.
a70 8
      <tip>
       <para>
        Intuitively, serializable means that two concurrent
        transactions will leave the database in the same state as if
        the two had been executed strictly one after the other (in one
        order or the other).
       </para>
      </tip>
d106 1
a106 1
   does not prevent writes to disk.
d133 3
a135 2
   This allows them to be set in the configuration file.  Consult <xref
   linkend="runtime-config"> for more information.
d145 1
a145 1
   isolation level in the standard; in
d148 1
a148 1
   mentioned above.  Because of multiversion concurrency control, the
@


1.19
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d1 1
a1 1
<!-- $PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.18 2003/11/06 22:08:14 petere Exp $ -->
d19 7
a25 7
SET TRANSACTION
    [ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
    [ READ WRITE | READ ONLY ]

SET SESSION CHARACTERISTICS AS TRANSACTION
    [ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
    [ READ WRITE | READ ONLY ]
d37 1
a37 1
   characteristics for each transaction of a session.  <command>SET
d50 1
a50 1
   transaction can see when other transactions are running concurrently.
d67 3
a69 2
       The current transaction can only see rows committed before
       first query or data-modification statement was executed in this transaction.
d75 2
a76 2
        the two has been executed strictly after one another in either
        order.
d83 10
a92 4
   The level <literal>READ UNCOMMITTED</literal> is mapped to
   <literal>READ COMMITTED</literal>, the level <literal>REPEATABLE
   READ</literal> is mapped to <literal>SERIALIZABLE</literal>, The
   transaction isolation level cannot be set after the first query or
d95 1
a95 1
   <command>UPDATE</command>, <command>FETCH</command>,
d122 21
a142 7
   The session default transaction isolation level can also be set
   with the command
<programlisting>
SET default_transaction_isolation = '<replaceable>value</replaceable>'
</programlisting>
   and in the configuration file.  Consult <xref linkend="runtime-config"> for more
   information.
d155 1
a155 1
   described above.  Because of multiversion concurrency control, the
d163 9
a171 1
   area.  This concept is only for use in embedded SQL.
@


1.18
log
@Implement isolation levels read uncommitted and repeatable read as acting
like the next higher one.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.17 2003/09/11 21:42:20 momjian Exp $ -->
@


1.17
log
@This patch fixes a few missed GUC variables that were still upper case,
makes a few more small improvements to runtime.sgml, and makes some SGML
conventions more consistent.

Neil Conway
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.16 2003/09/09 18:28:53 tgl Exp $ -->
d20 3
a22 1
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
d24 2
a25 1
    [ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
d82 5
a86 2
   The transaction isolation level cannot be set after the first query
   or data-modification statement (<command>SELECT</command>,
d131 6
a136 7
   isolation level in the standard; in <productname>PostgreSQL</productname> the default is
   ordinarily <literal>READ COMMITTED</literal>, but you can change it as
   described above.  <productname>PostgreSQL</productname> does not
   provide the isolation levels <literal>READ UNCOMMITTED</literal>
   and <literal>REPEATABLE READ</literal>. Because of multiversion
   concurrency control, the <literal>SERIALIZABLE</literal> level is
   not truly serializable. See <xref linkend="mvcc"> for details.
@


1.17.2.1
log
@Fix confusion between COPY FROM and COPY TO, per Gavin Sharry and Arul Shaji.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.17 2003/09/11 21:42:20 momjian Exp $ -->
d93 1
a93 1
   <literal>DELETE</literal>, and <literal>COPY FROM</literal> if the
@


1.16
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.15 2003/08/31 17:32:24 petere Exp $ -->
d125 1
a125 1
   isolation level in the standard; in PostgreSQL the default is
@


1.15
log
@Add/edit index entries.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.14 2003/05/04 02:23:16 petere Exp $ -->
d123 1
a123 1
   Both commands are defined in the SQL standard.
d125 2
a126 2
   isolation level in <acronym>SQL</acronym>; in PostgreSQL it is
   <literal>READ COMMITED</literal>, but you can change it as
@


1.14
log
@Last round of reference page editing.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.13 2003/03/25 16:15:44 petere Exp $ -->
d12 4
@


1.14.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.15 2003/08/31 17:32:24 petere Exp $ -->
a11 4

 <indexterm zone="sql-set-transaction">
  <primary>SET TRANSACTION</primary>
 </indexterm>
@


1.13
log
@Merge documentation into one book.  (Build with "make html".)  Replace
vague cross-references with real links.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.12 2003/01/19 00:13:31 momjian Exp $ -->
a2 4
 <docinfo>
  <date>2000-11-24</date>
 </docinfo>

d14 1
a14 1
  <synopsis>
d19 1
a19 1
  </synopsis>
d27 2
a28 2
   characteristics of the current SQL-transaction. It has no effect on
   any subsequent transactions.  <command>SET SESSION
d79 3
a81 1
   <command>COPY</command>) of a transaction has been executed.
d118 11
a128 2
  <refsect2 id="R2-SQL-SET-TRANSACTION-4">
   <title>SQL92, SQL99</title>
d130 5
a134 16
   <para>
    <option>SERIALIZABLE</option> is the default transaction isolation level in
    <acronym>SQL</acronym>.  <productname>PostgreSQL</productname> does
    not provide the isolation levels <option>READ UNCOMMITTED</option> 
    and <option>REPEATABLE READ</option>. Because of multiversion
    concurrency control, the <option>SERIALIZABLE</option> level is not
    truly serializable. See <xref linkend="mvcc"> for details.
   </para>

   <para>
    In <acronym>SQL</acronym> there is one other transaction
    characteristic that can be set with these commands: the size of
    the diagnostics area.  This concept is not supported in
    <productname>PostgreSQL</productname>.
   </para>
  </refsect2>
@


1.12
log
@This patch includes a lot of minor cleanups to the SGML documentation,
including:

- replacing all the appropriate usages of <citetitle>PostgreSQL
...</citetitle> with &cite-user;, &cite-admin;, and so on

- fix an omission in the EXECUTE documentation

- add some more text to the EXPLAIN documentation

- improve the PL/PgSQL RETURN NEXT documentation (more work to do here)

- minor markup fixes


Neil Conway
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.11 2003/01/11 00:00:03 petere Exp $ -->
d112 1
a112 1
   and in the configuration file.  Consult the &cite-admin; for more
d129 1
a129 1
    truly serializable. See the &cite-user; for details.
@


1.11
log
@Fix markup.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.10 2003/01/10 22:03:27 petere Exp $ -->
d112 2
a113 3
   and in the
   configuration file.  Consult the <citetitle>Administrator's
   Guide</citetitle> for more information.
d129 1
a129 2
    truly serializable. See the <citetitle>User's Guide</citetitle> for
    details.
@


1.10
log
@Read-only transactions, as defined in SQL.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.9 2002/08/04 04:31:44 momjian Exp $ -->
d51 1
a51 1
     <term><literal>READ COMMITTED<literal></term>
@


1.9
log
@The attached patch implements START TRANSACTION, per SQL99. The
functionality of the command is basically identical to that of
BEGIN; it just accepts a few extra options (only one of which
PostgreSQL currently implements), and is standards-compliant.
The patch includes a simple regression test and documentation.

[ Regression tests removed, per Peter.]

Neil Conway
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql-server/doc/src/sgml/ref/set_transaction.sgml,v 1.8 2002/01/20 22:19:57 petere Exp $ -->
d19 4
a22 3
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL
    { READ COMMITTED | SERIALIZABLE }
d30 13
a42 11
   This command sets the transaction isolation level.  The
   <command>SET TRANSACTION</command> command sets the characteristics
   for the current SQL-transaction. It has no effect on any subsequent
   transactions.  This command cannot be used after the first query or data-modification
   statement (<command>SELECT</command>, <command>INSERT</command>,
   <command>DELETE</command>, <command>UPDATE</command>,
   <command>FETCH</command>, <command>COPY</command>) of a transaction
   has been executed.  <command>SET SESSION CHARACTERISTICS</command>
   sets the default transaction isolation level for each transaction
   for a session.  <command>SET TRANSACTION</command> can override it
   for an individual transaction.
d51 1
a51 1
     <term>READ COMMITTED</term>
d61 1
a61 1
     <term>SERIALIZABLE</term>
d78 22
d125 1
a125 1
    <option>SERIALIZABLE</option> is the default level in
d135 4
a138 5
    In <acronym>SQL</acronym> there are two other transaction
    characteristics that can be set with these commands: whether the
    transaction is read-only and the size of the diagnostics area.
    Neither of these concepts are supported in
    <productname>PostgreSQL</productname>. 
@


1.8
log
@Spell-check and markup police
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.7 2001/12/08 03:24:39 thomas Exp $ -->
d100 5
a104 5
    SERIALIZABLE is the default level in <acronym>SQL</acronym>.
    <productname>PostgreSQL</productname> does not provide the
    isolation levels <option>READ UNCOMMITTED</option> 
    and <option>REPEATABLE READ</option>. Because
    of multiversion concurrency control, the serializable level is not
@


1.7
log
@Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
 between Postgres and PostgreSQL.
@
text
@d1 1
a1 1
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.6 2001/10/09 18:46:00 petere Exp $ -->
d32 1
a32 1
   transactions.  This command cannot be used after the first DML
d62 1
a62 1
       first DML statement was executed in this transaction.
d104 1
a104 1
    of multi-version concurrency control, the serializable level is not
@


1.6
log
@Bunch of copy fitting and style sheet tweakage to get decent looking print
output (from pdfjadetex).  Also updated instructions to install documentation
processing toolchain.
@
text
@d1 1
a1 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.5 2001/09/03 12:57:50 petere Exp $ -->
d101 3
a103 2
    Postgres does not provide the isolation levels <option>READ
     UNCOMMITTED</option> and <option>REPEATABLE READ</option>. Because
d113 2
a114 1
    Neither of these concepts are supported in Postgres.
@


1.5
log
@Put some kind of grammatical uniformity in the <refpurpose> lines.
@
text
@d1 1
a1 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.4 2001/06/30 22:03:25 petere Exp $ -->
d20 2
a21 1
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
d83 5
a87 2
   with the command <literal>SET default_transaction_isolation =
   '<replaceable>value</replaceable>'</literal> and in the
@


1.4
log
@Allow default transaction isolation level (a.k.a. set session
characteristics) to be set through GUC.
@
text
@d1 1
a1 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.3 2000/11/24 20:16:38 petere Exp $ -->
d14 1
a14 1
  <refpurpose>Set the characteristics of the current SQL-transaction</refpurpose>
@


1.3
log
@Make SET SESSION CHARACTERISTICS compliant with SQL 99.  Remove redundant,
non-standard clauses.  Allow CHARACTERISTICS as unquoted identifier.
Merge related reference pages.
@
text
@d1 1
a1 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.2 2000/07/14 15:27:14 thomas Exp $ -->
d74 12
@


1.2
log
@Add information on SET SESSION CHARACTERISTICS.
Fix references to pg_hba.conf(5) since that is no longer a man page.
Make minor repairs to "Compatibility" subsections.
@
text
@d1 1
a1 1
<!-- $Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.1 2000/06/18 21:24:54 petere Exp $ -->
d3 4
d11 1
d16 1
a17 3
  <refsynopsisdivinfo>
   <date>2000-06-01</date>
  </refsynopsisdivinfo>
d20 1
d28 11
a38 7
   The <command>SET TRANSACTION</command> command sets the
   characteristics for the current SQL-transaction. It has no effect
   on any subsequent transactions. This command cannot be used after
   the first DML statement (<command>SELECT</command>,
   <command>INSERT</command>, <command>DELETE</command>,
   <command>UPDATE</command>, <command>FETCH</command>,
   <command>COPY</command>) of a transaction has been executed.
d94 1
a94 1
    characteristics that can be set with this command: whether the
@


1.1
log
@Separated set constraints and set transaction reference pages, revised set
reference page to new configuration system. Big update to administrator's
guide, chapters Runtime environment, Client authentication, and User
management, the latter two were part of the old Security chapter.
@
text
@d1 1
a1 1
<!-- $Header$ -->
d4 1
a4 1
  <refentrytitle id="SQL-SET-TRANSACTION-title">SET TRANSACTION</refentrytitle>
d69 1
a69 1
 <refsect1>
d72 2
a73 12
  <para>
   SQL92, SQL99
  </para>

  <para>
   SERIALIZABLE is the default level in <acronym>SQL</acronym>.
   Postgres does not provide the isolation levels <option>READ
   UNCOMMITTED</option> and <option>REPEATABLE READ</option>. Because
   of multi-version concurrency control, the serializable level is not
   truly serializable. See the <citetitle>User's Guide</citetitle> for
   details.
  </para>
d75 16
a90 6
  <para>
   In <acronym>SQL</acronym> there are two other transaction
   characteristics that can be set with this command: whether the
   transaction is read-only and the size of the diagnostics area.
   Neither of these concepts are supported in Postgres.
  </para>
d94 16
@
