head	1.39;
access;
symbols
	REL9_0_0:1.39
	REL9_1_ALPHA1:1.39
	REL9_0_RC1:1.39
	REL9_0_BETA4:1.39
	REL9_0_STABLE:1.39.0.2
	REL9_0_BETA3:1.39
	REL9_0_BETA2:1.39
	REL7_4_29:1.26
	REL8_0_25:1.33
	REL8_1_21:1.33
	REL8_2_17:1.34.2.1
	REL8_3_11:1.36
	REL8_4_4:1.37
	REL9_0_BETA1:1.39
	REL9_0_ALPHA5_BRANCH:1.38.0.8
	REL9_0_ALPHA5:1.38
	REL7_4_28:1.26
	REL8_0_24:1.33
	REL8_1_20:1.33
	REL8_2_16:1.34.2.1
	REL8_3_10:1.36
	REL8_4_3:1.37
	REL9_0_ALPHA4:1.38
	REL9_0_ALPHA4_BRANCH:1.38.0.6
	REL8_5_ALPHA3:1.38
	REL8_5_ALPHA3_BRANCH:1.38.0.4
	REL7_4_27:1.26
	REL8_0_23:1.33
	REL8_1_19:1.33
	REL8_2_15:1.34.2.1
	REL8_3_9:1.36
	REL8_4_2:1.37
	REL8_5_ALPHA2:1.38
	REL8_5_ALPHA2_BRANCH:1.38.0.2
	REL7_4_26:1.26
	REL8_0_22:1.33
	REL8_1_18:1.33
	REL8_2_14:1.34.2.1
	REL8_3_8:1.36
	REL8_4_1:1.37
	REL8_5_ALPHA1:1.37
	REL8_5_ALPHA1_BRANCH:1.37.0.4
	REL8_4_STABLE:1.37.0.2
	REL8_4_0:1.37
	REL8_4_RC2:1.37
	REL8_4_RC1:1.37
	REL8_4_BETA2:1.37
	REL8_4_BETA1:1.37
	REL7_4_25:1.26
	REL8_0_21:1.33
	REL8_1_17:1.33
	REL8_2_13:1.34.2.1
	REL8_3_7:1.36
	REL7_4_24:1.26
	REL8_0_20:1.33
	REL8_1_16:1.33
	REL8_2_12:1.34.2.1
	REL8_3_6:1.36
	REL7_4_23:1.26
	REL8_0_19:1.33
	REL8_1_15:1.33
	REL8_2_11:1.34.2.1
	REL8_3_5:1.36
	REL7_4_22:1.26
	REL8_0_18:1.33
	REL8_1_14:1.33
	REL8_2_10:1.34.2.1
	REL8_3_4:1.36
	REL7_4_21:1.26
	REL8_0_17:1.33
	REL8_1_13:1.33
	REL8_2_9:1.34.2.1
	REL8_3_3:1.36
	REL7_4_20:1.26
	REL8_0_16:1.33
	REL8_1_12:1.33
	REL8_2_8:1.34.2.1
	REL8_3_2:1.36
	REL8_2_7:1.34.2.1
	REL8_3_1:1.36
	REL8_3_STABLE:1.36.0.2
	REL8_3_0:1.36
	REL8_3_RC2:1.36
	REL7_3_21:1.20
	REL7_4_19:1.26
	REL8_0_15:1.33
	REL8_1_11:1.33
	REL8_2_6:1.34.2.1
	REL8_3_RC1:1.36
	REL8_3_BETA4:1.36
	REL8_3_BETA3:1.36
	REL8_3_BETA2:1.36
	REL8_3_BETA1:1.36
	REL7_3_20:1.20
	REL7_4_18:1.26
	REL8_0_14:1.33
	REL8_1_10:1.33
	REL8_2_5:1.34.2.1
	REL7_3_19:1.20
	REL7_4_17:1.26
	REL8_0_13:1.33
	REL8_1_9:1.33
	REL8_2_4:1.34
	REL8_0_12:1.33
	REL8_1_8:1.33
	REL8_2_3:1.34
	REL7_3_18:1.20
	REL7_4_16:1.26
	REL8_0_11:1.33
	REL8_1_7:1.33
	REL8_2_2:1.34
	REL8_0_10:1.33
	REL8_1_6:1.33
	REL8_2_1:1.34
	REL7_4_15:1.26
	REL7_3_17:1.20
	REL8_2_STABLE:1.34.0.2
	REL8_2_0:1.34
	REL8_2_RC1:1.34
	REL8_2_BETA3:1.34
	REL8_2_BETA2:1.34
	REL8_1_5:1.33
	REL8_0_9:1.33
	REL7_4_14:1.26
	REL7_3_16:1.20
	REL8_2_BETA1:1.34
	REL7_3_15:1.20
	REL7_4_13:1.26
	REL8_0_8:1.33
	REL8_1_4:1.33
	REL7_3_14:1.20
	REL7_4_12:1.26
	REL8_0_7:1.33
	REL8_1_3:1.33
	REL7_3_13:1.20
	REL7_4_11:1.26
	REL8_0_6:1.33
	REL8_1_2:1.33
	REL7_3_12:1.20
	REL7_4_10:1.26
	REL8_0_5:1.33
	REL8_1_1:1.33
	REL8_1_STABLE:1.33.0.6
	REL8_1_0:1.33
	REL8_1_0RC1:1.33
	REL8_1_0BETA4:1.33
	REL8_1_0BETA3:1.33
	REL7_3_11:1.20
	REL7_4_9:1.26
	REL8_0_4:1.33
	REL8_1_0BETA2:1.33
	REL8_1_0BETA1:1.33
	REL7_2_8:1.15
	REL7_3_10:1.20
	REL7_4_8:1.26
	REL8_0_3:1.33
	REL8_0_2:1.33
	REL7_2_7:1.15
	REL7_3_9:1.20
	REL7_4_7:1.26
	REL8_0_1:1.33
	REL8_0_STABLE:1.33.0.4
	REL8_0_0:1.33.0.2
	REL8_0_0RC5:1.33
	REL8_0_0RC4:1.33
	REL8_0_0RC3:1.33
	REL8_0_0RC2:1.33
	REL8_0_0RC1:1.33
	REL8_0_0BETA5:1.33
	REL8_0_0BETA4:1.33
	REL7_4_6:1.26
	REL7_3_8:1.20
	REL7_2_6:1.15
	REL8_0_0BETA3:1.33
	REL8_0_0BETA2:1.33
	REL7_2_5:1.15
	REL7_4_5:1.26
	REL7_3_7:1.20
	REL7_4_4:1.26
	REL8_0_0BETA1:1.32
	REL7_4_3:1.26
	REL7_4_2:1.26
	REL7_3_6:1.20
	REL7_4_1:1.26
	REL7_3_5:1.20
	REL7_4:1.26
	REL7_4_RC2:1.26
	REL7_4_STABLE:1.26.0.2
	REL7_4_RC1:1.26
	REL7_4_BETA5:1.26
	REL7_4_BETA4:1.26
	REL7_4_BETA3:1.26
	REL7_4_BETA2:1.24
	WIN32_DEV:1.24.0.2
	REL7_4_BETA1:1.24
	REL7_3_4:1.20
	REL7_3_2:1.20
	REL7_2_4:1.15
	REL7_3_STABLE:1.20.0.2
	REL7_2_3:1.15
	REL7_2_STABLE:1.15.0.2
	REL7_2:1.15
	REL7_2_RC2:1.15
	REL7_2_RC1:1.15
	REL7_2_BETA5:1.15
	REL7_2_BETA4:1.15
	REL7_2_BETA3:1.14
	REL7_2_BETA2:1.14
	REL7_2_BETA1:1.14
	REL7_1_2:1.13
	REL7_1_STABLE:1.13.0.2
	REL7_1_BETA:1.12
	REL7_1_BETA3:1.13
	REL7_1_BETA2:1.13
	REL7_1:1.13
	REL7_0_PATCHES:1.11.0.2
	REL7_0:1.11
	REL6_5_PATCHES:1.8.0.2
	REL6_5:1.8
	REL6_4:1.4.0.2;
locks; strict;
comment	@# @;


1.39
date	2010.04.03.07.22.57;	author petere;	state Exp;
branches;
next	1.38;

1.38
date	2009.09.18.05.00.41;	author petere;	state Exp;
branches;
next	1.37;

1.37
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.36;

1.36
date	2007.05.15.19.43.51;	author neilc;	state Exp;
branches;
next	1.35;

1.35
date	2007.01.31.23.26.02;	author momjian;	state Exp;
branches;
next	1.34;

1.34
date	2006.09.16.00.30.17;	author momjian;	state Exp;
branches
	1.34.2.1;
next	1.33;

1.33
date	2004.08.12.21.00.21;	author tgl;	state Exp;
branches;
next	1.32;

1.32
date	2004.08.08.01.48.31;	author momjian;	state Exp;
branches;
next	1.31;

1.31
date	2004.08.01.17.32.13;	author tgl;	state Exp;
branches;
next	1.30;

1.30
date	2004.01.11.09.24.17;	author petere;	state Exp;
branches;
next	1.29;

1.29
date	2004.01.11.05.46.58;	author neilc;	state Exp;
branches;
next	1.28;

1.28
date	2004.01.10.02.21.08;	author momjian;	state Exp;
branches;
next	1.27;

1.27
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.26;

1.26
date	2003.09.09.18.28.52;	author tgl;	state Exp;
branches;
next	1.25;

1.25
date	2003.08.31.17.32.21;	author petere;	state Exp;
branches;
next	1.24;

1.24
date	2003.05.14.03.26.00;	author tgl;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	2003.04.15.13.25.08;	author petere;	state Exp;
branches;
next	1.22;

1.22
date	2003.03.25.16.15.39;	author petere;	state Exp;
branches;
next	1.21;

1.21
date	2003.01.19.00.13.29;	author momjian;	state Exp;
branches;
next	1.20;

1.20
date	2002.09.21.18.32.54;	author petere;	state Exp;
branches;
next	1.19;

1.19
date	2002.08.30.22.45.25;	author tgl;	state Exp;
branches;
next	1.18;

1.18
date	2002.08.04.04.31.44;	author momjian;	state Exp;
branches;
next	1.17;

1.17
date	2002.04.21.19.02.39;	author thomas;	state Exp;
branches;
next	1.16;

1.16
date	2002.03.06.06.48.03;	author momjian;	state Exp;
branches;
next	1.15;

1.15
date	2001.12.08.03.24.34;	author thomas;	state Exp;
branches;
next	1.14;

1.14
date	2001.09.03.12.57.49;	author petere;	state Exp;
branches;
next	1.13;

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

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

1.11
date	2000.03.27.17.14.42;	author thomas;	state Exp;
branches;
next	1.10;

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

1.9
date	99.07.22.15.09.06;	author thomas;	state Exp;
branches;
next	1.8;

1.8
date	99.07.06.17.16.33;	author thomas;	state Exp;
branches;
next	1.7;

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

1.6
date	99.06.11.05.19.53;	author vadim;	state Exp;
branches;
next	1.5;

1.5
date	98.12.29.02.24.33;	author thomas;	state Exp;
branches;
next	1.4;

1.4
date	98.10.30.19.33.34;	author thomas;	state Exp;
branches;
next	1.3;

1.3
date	98.09.16.14.42.54;	author thomas;	state Exp;
branches;
next	1.2;

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

1.1
date	98.05.13.05.33.58;	author thomas;	state Exp;
branches;
next	;

1.24.2.1
date	2003.09.07.04.36.44;	author momjian;	state Exp;
branches;
next	;

1.34.2.1
date	2007.05.15.19.43.59;	author neilc;	state Exp;
branches;
next	;


desc
@@


1.39
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/begin.sgml,v 1.38 2009/09/18 05:00:41 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-BEGIN">
 <refmeta>
  <refentrytitle>BEGIN</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>BEGIN</refname>
  <refpurpose>start a transaction block</refpurpose>
 </refnamediv>

 <indexterm zone="sql-begin">
  <primary>BEGIN</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
BEGIN [ WORK | 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>
   <command>BEGIN</command> initiates a transaction block, that is,
   all statements after a <command>BEGIN</command> command will be
   executed in a single transaction until an explicit <xref
   linkend="sql-commit"> or <xref
   linkend="sql-rollback"> is given.
   By default (without <command>BEGIN</command>),
   <productname>PostgreSQL</productname> executes
   transactions in <quote>autocommit</quote> mode, that is, each
   statement is executed in its own transaction and a commit is
   implicitly performed at the end of the statement (if execution was
   successful, otherwise a rollback is done).
  </para>

  <para>
   Statements are executed more quickly in a transaction block, because
   transaction start/commit requires significant CPU and disk
   activity. Execution of multiple statements inside a transaction is
   also useful to ensure consistency when making several related changes:
   other sessions will be unable to see the intermediate states
   wherein not all the related updates have been done.
  </para>

  <para>
   If the isolation level or read/write mode is specified, the new
   transaction has those characteristics, as if
   <xref linkend="sql-set-transaction"> 
   was executed.
  </para>
 </refsect1>
  
 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><literal>WORK</literal></term>
    <term><literal>TRANSACTION</literal></term>
    <listitem>
     <para>
      Optional key words. They have no effect.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>

  <para>
   Refer to <xref linkend="sql-set-transaction"> for information on the meaning
   of the other parameters to this statement.
  </para>
 </refsect1>
  
 <refsect1>
  <title>Notes</title>

  <para>
   <xref linkend="sql-start-transaction"> has the same functionality
   as <command>BEGIN</>.
  </para>
   
  <para>
   Use <xref linkend="SQL-COMMIT"> or
   <xref linkend="SQL-ROLLBACK">
   to terminate a transaction block.
  </para>

  <para>
   Issuing <command>BEGIN</> when already inside a transaction block will
   provoke a warning message.  The state of the transaction is not affected.
   To nest transactions within a transaction block, use savepoints 
   (see <xref linkend="sql-savepoint">).
  </para>

  <para>
   For reasons of backwards compatibility, the commas between successive
   <replaceable class="parameter">transaction_modes</replaceable> can be
   omitted.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   To begin a transaction block:

<programlisting>
BEGIN;
</programlisting>
  </para>
 </refsect1>
 
 <refsect1>
  <title>Compatibility</title>

  <para>
   <command>BEGIN</command> is a <productname>PostgreSQL</productname>
   language extension.  It is equivalent to the SQL-standard command
   <xref linkend="sql-start-transaction">, whose reference page
   contains additional compatibility information.
  </para>

  <para>
   Incidentally, the <literal>BEGIN</literal> key word is used for a
   different purpose in embedded SQL. You are advised to be careful
   about the transaction semantics when porting database applications.
  </para>
 </refsect1>

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-commit"></member>
   <member><xref linkend="sql-rollback"></member>
   <member><xref linkend="sql-start-transaction"></member>
   <member><xref linkend="sql-savepoint"></member>
  </simplelist>
 </refsect1>
</refentry>
@


1.38
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
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.37 2008/11/14 10:22:45 petere Exp $
d8 1
a8 1
  <refentrytitle id="SQL-BEGIN-TITLE">BEGIN</refentrytitle>
d40 2
a41 2
   linkend="sql-commit" endterm="sql-commit-title"> or <xref
   linkend="sql-rollback" endterm="sql-rollback-title"> is given.
d62 1
a62 1
   <xref linkend="sql-set-transaction" endterm="sql-set-transaction-title"> 
d83 1
a83 2
   Refer to <xref linkend="sql-set-transaction"
   endterm="sql-set-transaction-title"> for information on the meaning
d92 1
a92 2
   <xref linkend="sql-start-transaction"
   endterm="sql-start-transaction-title"> has the same functionality
d97 2
a98 2
   Use <xref linkend="SQL-COMMIT" endterm="SQL-COMMIT-TITLE"> or
   <xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE">
d106 1
a106 1
   (see <xref linkend="sql-savepoint" endterm="sql-savepoint-title">).
d134 1
a134 2
   <xref linkend="sql-start-transaction"
   endterm="sql-start-transaction-title">, whose reference page
d149 4
a152 4
   <member><xref linkend="sql-commit" endterm="sql-commit-title"></member>
   <member><xref linkend="sql-rollback" endterm="sql-rollback-title"></member>
   <member><xref linkend="sql-start-transaction" endterm="sql-start-transaction-title"></member>
   <member><xref linkend="sql-savepoint" endterm="sql-savepoint-title"></member>
@


1.37
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
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.36 2007/05/15 19:43:51 neilc Exp $
d26 1
a26 1
where <replaceable class="parameter">transaction_mode</replaceable> is one of:
@


1.36
log
@Fix a bunch of bad grammar in the docs: "<link>, which see for more
information" is un-good English.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.35 2007/01/31 23:26:02 momjian Exp $
d9 1
@


1.35
log
@Update reference documentation on may/can/might:

Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.34 2006/09/16 00:30:17 momjian Exp $
d136 2
a137 2
   endterm="sql-start-transaction-title">, which see for additional
   compatibility information.
@


1.34
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.33 2004/08/12 21:00:21 tgl Exp $
d112 1
a112 1
   <replaceable class="parameter">transaction_modes</replaceable> may be
@


1.34.2.1
log
@Fix a bunch of bad grammar in the docs: "<link>, which see for more
information" is un-good English.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.34 2006/09/16 00:30:17 momjian Exp $
d136 2
a137 2
   endterm="sql-start-transaction-title">, whose reference page
   contains additional compatibility information.
@


1.33
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
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.32 2004/08/08 01:48:31 momjian Exp $
a157 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.32
log
@Included is an example of using savepoints in a non-trivial example.

Giving examples in the SQL command reference is hard because we don't
have conditionals at the SQL level.

Gavin Sherry
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.31 2004/08/01 17:32:13 tgl Exp $
d23 6
a28 3
BEGIN [ WORK | TRANSACTION ]
    [ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
    [ READ WRITE | READ ONLY ]
d107 7
a113 2
   (See <xref linkend="sql-start-transaction" endterm="sql-start-transaction-title">
   for more information).
d134 4
a137 9
   language extension.  There is no explicit <command>BEGIN</command>
   command in the SQL standard; transaction initiation is
   always implicit and it terminates either with a
   <command>COMMIT</command> or <command>ROLLBACK</command> statement.
  </para>

  <para>
   Other relational database systems may offer an autocommit feature
   as a convenience.
@


1.31
log
@Some mop-up work for savepoints (nested transactions).  Store a small
number of active subtransaction XIDs in each backend's PGPROC entry,
and use this to avoid expensive probes into pg_subtrans during
TransactionIdIsInProgress.  Extend EOXactCallback API to allow add-on
modules to get control at subxact start/end.  (This is deliberately
not compatible with the former API, since any uses of that API probably
need manual review anyway.)  Add basic reference documentation for
SAVEPOINT and related commands.  Minor other cleanups to check off some
of the open issues for subtransactions.
Alvaro Herrera and Tom Lane.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.30 2004/01/11 09:24:17 petere Exp $
d103 3
@


1.30
log
@Put See Also links back in alphabetical order.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.29 2004/01/11 05:46:58 neilc Exp $
d34 1
a34 1
   all statements after <command>BEGIN</command> command will be
d148 1
@


1.29
log
@Minor documentation improvements.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.28 2004/01/10 02:21:08 momjian Exp $
a144 1
   <member><xref linkend="sql-start-transaction" endterm="sql-start-transaction-title"></member>
d147 1
@


1.28
log
@Allow BEGIN WORK to specify transaction isolation level, like START
TRANSACTION.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.27 2003/11/29 19:51:38 pgsql Exp $
d79 3
a81 3
   See under <xref linkend="sql-set-transaction"
   endterm="sql-set-transaction-title"> about the meaning of the
   other parameters.
d145 1
@


1.27
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.26 2003/09/09 18:28:52 tgl Exp $
d24 2
d54 7
d77 6
@


1.26
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.25 2003/08/31 17:32:21 petere Exp $
@


1.25
log
@Add/edit index entries.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.24 2003/05/14 03:26:00 tgl Exp $
d31 7
a37 1
   By default, <productname>PostgreSQL</productname> executes
d42 4
a45 6
   <command>BEGIN</command> initiates a transaction block, that is,
   all statements after <command>BEGIN</command> command will be
   executed in a single transaction until an explicit <xref
   linkend="sql-commit" endterm="sql-commit-title"> or <xref
   linkend="sql-rollback" endterm="sql-rollback-title">.  Statements
   are executed more quickly in a transaction block, because
d48 2
a49 2
   also useful to ensure consistency when changing several related
   tables: other sessions will be unable to see the intermediate states
a70 25
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>BEGIN</computeroutput></term>
    <listitem>
     <para>
      This signifies that a new transaction has been started.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><computeroutput>WARNING:  BEGIN: already a transaction in progress</computeroutput></term>
    <listitem>
     <para>
      This indicates that a transaction was already in progress.  The
      current transaction is not affected.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
  
 <refsect1>
d82 6
a87 1
   to terminate a transaction.
d124 9
@


1.24
log
@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.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.23 2003/04/15 13:25:08 petere Exp $
d16 4
@


1.24.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.25 2003/08/31 17:32:21 petere Exp $
a15 4

 <indexterm zone="sql-begin">
  <primary>BEGIN</primary>
 </indexterm>
@


1.23
log
@Bring SQL ref pages to consistent format, part 1.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.22 2003/03/25 16:15:39 petere Exp $
a99 6
  </para>
   
  <para>
   If you turn the configuration parameter <varname>autocommit</> off,
   then <command>BEGIN</> is not required: any SQL command
   automatically starts a transaction.
@


1.22
log
@Merge documentation into one book.  (Build with "make html".)  Replace
vague cross-references with real links.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.21 2003/01/19 00:13:29 momjian Exp $
d11 1
d13 4
a16 8
  <refname>
   BEGIN
  </refname>
  <refpurpose>
   start a transaction block
  </refpurpose>
  
  </refnamediv>
d18 1
a18 4
  <refsynopsisdivinfo>
   <date>1999-07-20</date>
  </refsynopsisdivinfo>
  <synopsis>
d20 1
a20 59
  </synopsis>
  
  <refsect2 id="R2-SQL-BEGIN-1">
   <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    Inputs
   </title>
   <para>

    <variablelist>
     <varlistentry>
      <term>WORK</term>
      <term>TRANSACTION</term>
      <listitem>
       <para>
	Optional keywords. They have no effect.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
  
  <refsect2 id="R2-SQL-BEGIN-2">
   <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    Outputs
   </title>

   <para>
    <variablelist>
     <varlistentry>
      <term><computeroutput>
BEGIN
       </computeroutput></term>
      <listitem>
       <para>
	This signifies that a new transaction has been started.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><computeroutput>
WARNING:  BEGIN: already a transaction in progress
       </computeroutput></term>
      <listitem>
       <para>
	This indicates that a transaction was already in progress.
	The current transaction is not affected.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
d23 2
a24 28
 <refsect1 id="R1-SQL-BEGIN-1">
  <refsect1info>
   <date>1999-06-11</date>
  </refsect1info>
  <title>
   Description
  </title>

  <para>
   By default, <productname>PostgreSQL</productname> executes transactions
   in <firstterm>unchained mode</firstterm>
   (also known as <quote>autocommit</quote> in other database
   systems).
   In other words, each user statement is executed in its own transaction
   and a commit is implicitly performed at the end of the statement
   (if execution was successful, otherwise a rollback is done).
   <command>BEGIN</command> initiates a user transaction in chained mode,
   i.e., all user statements after <command>BEGIN</command> command will
   be executed in a single transaction until an explicit 
   <xref linkend="sql-commit" endterm="sql-commit-title"> or
   <xref linkend="sql-rollback" endterm="sql-rollback-title">.
   Statements are executed more quickly in chained mode,
   because transaction start/commit requires significant CPU and disk 
   activity. Execution of multiple statements inside a transaction
   is also useful to ensure consistency when changing several
   related tables: other clients will be unable to see the intermediate
   states wherein not all the related updates have been done.
  </para>
d27 16
a42 12
   The default transaction isolation level in
   <productname>PostgreSQL</productname>
   is READ COMMITTED, wherein each query inside the transaction sees changes
   committed before that query begins execution. So, you have to use 
   <command>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE</command>
   just after <command>BEGIN</command> if you need more rigorous transaction
   isolation.  (Alternatively, you can change the default transaction
   isolation level; see <xref linkend="runtime-config"> for details.)
   In SERIALIZABLE mode queries will see only changes committed before
   the entire
   transaction began (actually, before execution of the first <acronym>DML</> statement
   in the transaction).
d44 45
d91 3
a93 2
   Transactions have the standard <acronym>ACID</acronym>
   (atomic, consistent, isolatable, and durable) properties.
a94 13
  
  <refsect2 id="R2-SQL-BEGIN-3">
   <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    Notes
   </title>
   <para>
    <xref linkend="sql-start-transaction"
    endterm="sql-start-transaction-title"> has the same functionality
    as <command>BEGIN</>.
   </para>
d96 5
a100 12
   <para>
    Use <xref linkend="SQL-COMMIT" endterm="SQL-COMMIT-TITLE">
    or
    <xref linkend="SQL-ROLLBACK" endterm="SQL-ROLLBACK-TITLE">
    to terminate a transaction.
   </para>

   <para>
    Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
    for further information
    about locking tables inside a transaction.
   </para>
d102 5
a106 5
   <para>
    If you turn <varname>autocommit</> mode off, then <command>BEGIN</>
    is not required: any SQL command automatically starts a transaction.
   </para>
  </refsect2>
d109 2
a110 4
 <refsect1 id="R1-SQL-BEGIN-2">
  <title>
   Usage
  </title>
d113 1
a113 1
   To begin a user transaction:
d115 3
a117 3
  <programlisting>
BEGIN WORK;
  </programlisting>
d121 2
a122 20
 <refsect1 id="R1-SQL-BEGIN-3">
  <title>
   Compatibility
  </title>

  <refsect2 id="R2-SQL-BEGIN-4">
     <refsect2info>
    <date>1999-06-11</date>
   </refsect2info>
   <title>
    SQL92
   </title>

   <para>
    <command>BEGIN</command>
    is a <productname>PostgreSQL</productname> language extension.
    There is no explicit <command>BEGIN</command>
    command in <acronym>SQL92</acronym>;
    transaction initiation is always implicit and it terminates either 
    with a <command>COMMIT</command> or <command>ROLLBACK</command> statement.
d124 12
a135 7
    <note>
     <para>
      Many relational database systems offer an autocommit feature as a
      convenience.
     </para>
    </note>
   </para>
d137 5
a141 11
   <para>
    Incidentally, the <literal>BEGIN</literal> keyword is used for a different
    purpose in embedded SQL. You are advised to be careful about the transaction
    semantics when porting database applications.
   </para>

   <para>
    <acronym>SQL92</acronym> also requires SERIALIZABLE to be the default
    transaction isolation level.
   </para>
  </refsect2>
@


1.21
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
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
d124 1
a124 1
   isolation level; see the &cite-admin; for details.)
@


1.20
log
@Add more appropriate markup.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.19 2002/08/30 22:45:25 tgl Exp $
d124 1
a124 2
   isolation level; see the <citetitle>PostgreSQL Administrator's
   Guide</citetitle> for details.)
d163 1
a163 1
    If you turn <literal>autocommit</> mode off, then <command>BEGIN</>
@


1.19
log
@Updates to reflect availability of autocommit option.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.18 2002/08/04 04:31:44 momjian Exp $
d128 1
a128 1
   transaction began (actually, before execution of the first DML statement
@


1.18
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
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/begin.sgml,v 1.17 2002/04/21 19:02:39 thomas Exp $
d106 3
a108 3
   <xref linkend="sql-commit" endterm="sql-commit-title">,
   <xref linkend="sql-rollback" endterm="sql-rollback-title">,
   or execution abort. Statements in chained mode are executed much faster, 
d111 3
a113 2
   is also required for consistency when changing several
   related tables.
d119 2
a120 2
   is READ COMMITTED, where queries inside the transaction see only changes
   committed before query execution. So, you have to use 
d122 4
a125 1
   just after <command>BEGIN</command> if you need more rigorous transaction isolation. 
d129 1
a129 1
   in a serializable transaction).
d133 2
a134 4
   If the transaction is committed, <productname>PostgreSQL</productname> 
   will ensure either that all updates are done or else that none of
   them are done. Transactions have the standard <acronym>ACID</acronym>
   (atomic, consistent, isolatable, and durable) property.
d145 3
a147 3
    Refer to <xref linkend="sql-lock" endterm="sql-lock-title">
    for further information
    about locking tables inside a transaction.
d155 11
@


1.17
log
@Augment the date/time examples in the User's Guide to reflect the newer
 capabilities of specifying time zones as intervals per SQL9x.
Put refentrytitle contents on the same line as the tag.
 Otherwise, leading whitespace is propagated into the product, which
 (at least) messes up the ToC layout.
Remove (some) docinfo tags containing dates. Best to omit if the dates
 are not accurate; maybe use CVS dates instead or leave them out.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.16 2002/03/06 06:48:03 momjian Exp $
d24 1
a24 1
  <synopsis>  
@


1.16
log
@Update reference pages for new INFO, NOTICE, WARNING elog() levels.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.15 2001/12/08 03:24:34 thomas Exp $
d8 1
a8 3
  <refentrytitle id="SQL-BEGIN-TITLE">
   BEGIN
  </refentrytitle>
@


1.15
log
@Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
 between Postgres and PostgreSQL.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.14 2001/09/03 12:57:49 petere Exp $
d75 1
a75 1
NOTICE:  BEGIN: already a transaction in progress
@


1.14
log
@Put some kind of grammatical uniformity in the <refpurpose> lines.
@
text
@d2 2
a3 2
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.13 2000/12/25 23:15:26 petere Exp $
Postgres documentation
d98 1
a98 1
   By default, <productname>Postgres</productname> executes transactions
d119 1
a119 1
   <productname>Postgres</productname>
d131 1
a131 1
   If the transaction is committed, <productname>Postgres</productname> 
d188 1
a188 1
    is a <productname>Postgres</productname> language extension.
@


1.13
log
@Refine some things to create better looking man pages.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.12 2000/10/07 14:16:01 momjian Exp $
d18 1
a18 1
   Begins a transaction in chained mode
@


1.12
log
@New beos files.  FAQ cleanup.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.11 2000/03/27 17:14:42 thomas Exp $
d108 2
a109 2
   <xref linkend="sql-commit-title" endterm="sql-commit-title">,
   <xref linkend="sql-rollback-title" endterm="sql-rollback-title">,
d145 1
a145 1
    Refer to <xref linkend="sql-lock-title" endterm="sql-lock-title">
d151 1
a151 1
    Use <xref linkend="SQL-COMMIT-TITLE" endterm="SQL-COMMIT-TITLE">
d153 1
a153 1
    <xref linkend="SQL-ROLLBACK-TITLE" endterm="SQL-ROLLBACK-TITLE">
@


1.11
log
@Start updating for the v7.0 release.
Use "generic functions" for math and other routines.
Use SQL92 "type 'literal'" syntax rather than Postgres "'literal'::type".
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.10 2000/01/29 16:58:27 petere Exp $
d106 1
a106 1
   i.e. all user statements after <command>BEGIN</command> command will
@


1.10
log
@A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.9 1999/07/22 15:09:06 thomas Exp $
d98 1
a98 1
   By default, <productname>PostgreSQL</productname> executes transactions
d119 1
a119 1
   <productname>PostgreSQL</productname>
d131 1
a131 1
   If the transaction is committed, <productname>PostgreSQL</productname> 
d188 1
a188 1
    is a <productname>PostgreSQL</productname> language extension.
@


1.9
log
@Complete merge of all old man page information.
ecpg reference page still needs formatting.
@
text
@d2 1
a2 1
$Header$
d75 1
a75 1
NOTICE:  BeginTransactionBlock and not in default state
d98 1
a98 1
   By default, <productname>Postgres</productname> executes transactions
d119 1
a119 1
   <productname>Postgres</productname>
d131 1
a131 1
   If the transaction is committed, <productname>Postgres</productname> 
a144 5
    The keyword TRANSACTION is just a cosmetic alternative to WORK.
    Neither keyword need be specified.
   </para>

   <para>
d188 1
a188 1
    is a <productname>Postgres</productname> language extension.
d200 6
@


1.8
log
@Fix markup for docbook2man man page generation.
No big deal; fixed lots of other markup at the same time.
Bigest change: make sure there is no whitespace
 in front of <term> contents.
This will probably help the other output types too.
@
text
@d1 6
a6 1
<refentry id="SQL-BEGINWORK">
d8 1
a8 1
  <refentrytitle id="SQL-BEGINWORK-TITLE">
d24 1
a24 1
   <date>1999-06-11</date>
d30 1
a30 1
  <refsect2 id="R2-SQL-BEGINWORK-1">
d38 12
a49 1
    None.
d53 1
a53 1
  <refsect2 id="R2-SQL-BEGINWORK-2">
d89 1
a89 1
 <refsect1 id="R1-SQL-BEGINWORK-1">
d107 3
a109 1
   be executed in a single transaction until an explicit COMMIT, ROLLBACK
d123 1
a123 1
   just after BEGIN if you need more rigorous transaction isolation. 
d137 1
a137 1
  <refsect2 id="R2-SQL-BEGINWORK-3">
d150 2
a151 1
    Refer to the <command>LOCK</command> statement for further information
d164 1
a164 1
 <refsect1 id="R1-SQL-BEGINWORK-2">
d178 1
a178 1
 <refsect1 id="R1-SQL-BEGINWORK-3">
d182 2
a183 5
  <para>
    <command>BEGIN</command>
    is a <productname>Postgres</productname> language extension.
  </para>
  <refsect2 id="R2-SQL-BEGINWORK-4">
d190 6
a195 2
   <para> 
    There is no explicit BEGIN WORK command in <acronym>SQL92</acronym>;
d197 1
a197 1
    with a COMMIT or with a ROLLBACK statement.
@


1.7
log
@Minor updates for release.
Split reference pages for CREATE TABLE AS and SELECT INTO to allow psgml
 (the emacs parser) to handle parsing.
@
text
@d33 1
a33 1
    None
d48 3
a50 3
      <term>
       <returnvalue>BEGIN</returnvalue>
      </term>
d58 3
a60 3
      <term>
       <returnvalue>NOTICE:  BeginTransactionBlock and not in default state</returnvalue>
      </term>
@


1.6
log
@More about chained mode and isolation levels.
@
text
@d1 12
a12 12
<REFENTRY ID="SQL-BEGINWORK">
 <REFMETA>
  <REFENTRYTITLE>
   BEGIN WORK
  </REFENTRYTITLE>
  <REFMISCINFO>SQL - Language Statements</REFMISCINFO>
 </REFMETA>
 <REFNAMEDIV>
  <REFNAME>
   BEGIN WORK
  </REFNAME>
  <REFPURPOSE>
d14 1
a14 1
  </REFPURPOSE>
d17 5
a21 5
 <REFSYNOPSISDIV>
  <REFSYNOPSISDIVINFO>
   <DATE>1998-09-08</DATE>
  </REFSYNOPSISDIVINFO>
  <SYNOPSIS>  
d23 1
a23 1
  </SYNOPSIS>
d25 5
a29 5
  <REFSECT2 ID="R2-SQL-BEGINWORK-1">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d31 2
a32 2
   </TITLE>
   <PARA>
d35 1
a35 1
  </REFSECT2>
d37 5
a41 5
  <REFSECT2 ID="R2-SQL-BEGINWORK-2">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d43 1
a43 2
   </TITLE>
   <PARA>
d45 18
a62 17
       <VARIABLELIST>
	<VARLISTENTRY>
	 <TERM>
	  <returnvalue>BEGIN</returnvalue>
	 </TERM>
	 <LISTITEM>
	  <PARA>
	   This signifies that a new transaction has been started.
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
	<VARLISTENTRY>
	 <TERM>
	   <returnvalue>NOTICE:  BeginTransactionBlock and not in default state</returnvalue>
	 </TERM>
	 <LISTITEM>
       <PARA>
d68 1
a68 1
    </VARIABLELIST>
d70 2
a71 2
  </REFSECT2>
 </REFSYNOPSISDIV>
d73 5
a77 5
 <REFSECT1 ID="R1-SQL-BEGINWORK-1">
  <REFSECT1INFO>
   <DATE>1998-09-08</DATE>
  </REFSECT1INFO>
  <TITLE>
d79 2
a80 1
  </TITLE>
d83 3
a85 1
   in unchained mode (also known as autocommit feature in other DBMSes).
d87 2
a88 1
   and commit is implicit (if execution was successfull).
d91 1
a91 1
   be executed in single transaction untill explicit COMMIT, ROLLBACK
d93 4
a96 3
   because of transaction start/commit requires significant CPU and disk 
   activity. This mode is also required for consistency when changing 
   one of related tables.
d98 1
d100 3
a102 2
   Default transaction isolation level in <productname>Postgres</productname>
   is READ COMMITTED one, when queries inside transaction see only changes
d105 5
a109 4
   command just after BEGIN if you need in better transaction isolation. 
   In SERIALIZABLE mode queries will see only changes committed before entire
   transaction began (actually, before execution of first DML statement
   in serializable transaction).
d111 1
d115 1
a115 1
   them are done. Transactions have the standard ACID
d119 5
a123 5
  <REFSECT2 ID="R2-SQL-BEGINWORK-3">
   <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d125 2
a126 2
   </TITLE>
   <PARA>
d129 1
a129 1
   </PARA>
d131 1
a131 1
   <PARA>
d134 1
a134 1
   </PARA>
d136 4
a139 2
   <PARA>
    Use <command>COMMIT</command> or <command>ROLLBACK</command>
d141 2
a142 2
   </PARA>
  </REFSECT2>
d144 3
a146 3
  
 <REFSECT1 ID="R1-SQL-BEGINWORK-2">
  <TITLE>
d148 1
a148 2
  </TITLE>
  <PARA>To begin a user transaction:
d150 4
a153 1
  <ProgramListing>
d155 1
a155 1
  </ProgramListing>
d157 1
a157 1
 </REFSECT1>
d159 2
a160 2
 <REFSECT1 ID="R1-SQL-BEGINWORK-3">
  <TITLE>
d162 2
a163 2
  </TITLE>
  <PARA>
d167 5
a171 5
  <REFSECT2 ID="R2-SQL-BEGINWORK-4">
     <REFSECT2INFO>
    <DATE>1998-09-08</DATE>
   </REFSECT2INFO>
   <TITLE>
d173 2
a174 2
   </TITLE>
   <PARA> 
d178 11
a188 3
   </PARA>
   <PARA>
    <acronym>SQL92</acronym> also requires SERIALIZABLE to be default
d190 1
a190 1
   </PARA>
d193 1
a193 1
</REFENTRY>
d198 1
a198 1
sgml-omittag:t
@


1.5
log
@Clean up to ensure tag completion as required by the newest versions
 of Norm's Modular Style Sheets and jade/docbook.
From Vince Vielhaber <vev@@michvhf.com>.
@
text
@d13 1
a13 1
   Begins a transaction
d81 25
a105 9
   <command>BEGIN</command> initiates a user transaction
 which <productname>Postgres</productname> will
   guarantee is serializable with respect to all concurrently
   executing transactions. <productname>Postgres</productname> uses two-phase
 locking
   to perform this task. If the transaction is committed,
   <productname>Postgres</productname> will ensure either that all updates are
 done or else
   that none of
d124 1
a124 1
 about locking tables inside a transaction.
d129 1
a129 1
 to terminate a transaction.
d152 1
a152 1
 is a <productname>Postgres</productname> language extension.
d163 6
a168 3
 transaction initiation
    is always implicit and it terminates either with a COMMIT or with
    a ROLLBACK statement.
@


1.4
log
@Minor cleanup in markup, especially in the Output section.
@
text
@d16 1
a16 1
  
d33 2
a34 1
       None
d62 8
a69 5
	  <PARA>
	   This indicates that a transaction was already in progress.
The current transaction is not affected.

   </VARIABLELIST>
d116 1
d127 1
d137 1
a137 1
  
@


1.3
log
@Markup and editing adjustments...
@
text
@d44 1
a44 8
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
      <replaceable>status</replaceable>
     </TERM>
     <LISTITEM>
      <PARA>
d64 1
a64 7
	  </PARA>
	 </LISTITEM>
	</VARLISTENTRY>
       </variablelist>
      </para>
     </LISTITEM>
    </VARLISTENTRY>
@


1.2
log
@Very minor formatting fixup in the refentry id field to remove
 the trailing "-1". This makes a cleaner html output file name.
Clean up a few refpurpose fields.
@
text
@d19 1
a19 1
   <DATE>1998-04-15</DATE>
d22 1
a22 1
   BEGIN { WORK | TRANSACTION }
d27 1
a27 1
    <DATE>1998-04-15</DATE>
a32 5
   </PARA>
   <VARIABLELIST>
    <VARLISTENTRY>
     <TERM>
      <ReturnValue>
a33 7
      </ReturnValue>
     </TERM>
     <LISTITEM>
      <para></para>
     </LISTITEM>
    </varlistentry>
   </VARIABLELIST>
d38 1
a38 1
    <DATE>1998-04-15</DATE>
d48 1
a48 1
      status
d55 1
a55 1
	  <ReturnValue>BEGIN</ReturnValue>
d65 1
a65 3
	  <ReturnValue>
	   NOTICE:  BeginTransactionBlock and not in default state
	  </ReturnValue>
d70 1
a70 5
	   <comment>
	    What happens to command queries already run
	    in the transaction?  Does this have no effect, or does
	    it restart the transaction?
	   </comment>
d84 1
a84 1
   <DATE>1998-04-15</DATE>
d90 5
a94 3
   BEGIN begins a user transaction which PostgreSQL will
   guarantee is serialisable with respect to all concurrently
   executing transactions. PostgreSQL uses two-phase locking
d96 2
a97 1
   PostgreSQL will ensure either that all updates are done orelse
d105 1
a105 1
    <DATE>1998-04-15</DATE>
d114 1
a114 5
   
   <PARA>
    BEGIN statement is a PostgreSQL language extension.
   </PARA>
   
d116 2
a117 2
    Refer to the LOCK statement for further information about locking
    tables inside a transaction.
d121 2
a122 1
    Use COMMIT or ROLLBACK to terminate a transaction.
d131 1
a131 1
  </PARA>
d133 1
a133 1
   BEGIN WORK;
d142 2
a143 1
  </PARA>
d147 1
a147 1
    <DATE>1998-04-15</DATE>
d153 2
a154 1
    There is no explicit "BEGIN WORK" in SQL92; transaction initiation
@


1.1
log
@First files for reference pages.
@
text
@d1 1
a1 1
<REFENTRY ID="SQL-BEGINWORK-1">
@
