Improve description of autocommit behavior in ecpg manual pages.
This commit is contained in:
parent
69f909ba10
commit
9600ccad13
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.33 2002/01/07 02:29:11 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.34 2002/01/18 20:32:53 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="ecpg">
|
<chapter id="ecpg">
|
||||||
@ -1053,14 +1053,16 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ",
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
All <acronym>SQL</acronym> statements are performed in one
|
In the default mode, queries are committed only when <command>exec
|
||||||
transaction unless you issue a commit transaction. To accomplish
|
sql commit</command> is issued. <application>Ecpg</application>
|
||||||
this auto-transaction behavior, the first statement and the first
|
also supports auto-commit of transactions via the
|
||||||
statement after a commit or rollback always begins a new transaction. To
|
<option>-t</option> command-line option or via the <literal>exec
|
||||||
disable this feature, use the <option>-t</option> command-line
|
sql set autocommit to on</literal> statement. In
|
||||||
option.
|
<literal>autocommit<literal> mode, each query is automatically
|
||||||
|
committed unless it is inside an explicit transaction block. This
|
||||||
|
mode can be explicitly turned off using <literal>exec sql set
|
||||||
|
autocommit to off</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.85 2002/01/07 02:29:12 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.86 2002/01/18 20:32:54 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="libpq">
|
<chapter id="libpq">
|
||||||
@ -2109,10 +2109,17 @@ for information on correct values for these environment variables.
|
|||||||
<para>
|
<para>
|
||||||
<filename>libpq</filename> is thread-safe as of
|
<filename>libpq</filename> is thread-safe as of
|
||||||
<productname>PostgreSQL</productname> 7.0, so long as no two threads
|
<productname>PostgreSQL</productname> 7.0, so long as no two threads
|
||||||
attempt to manipulate the same <structname>PGconn</> object at the same time. In particular,
|
attempt to manipulate the same <structname>PGconn</> object at the same
|
||||||
you cannot issue concurrent queries from different threads through the same
|
time. In particular, you cannot issue concurrent queries from different
|
||||||
connection object. (If you need to run concurrent queries, start up multiple
|
threads through the same connection object. (If you need to run
|
||||||
connections.)
|
concurrent queries, start up multiple connections.)
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
However, <filename>libpq</filename> clients using the
|
||||||
|
<literal>crypt</literal> encryption method rely on the
|
||||||
|
<literal>crypt()</literal> operating system function, which often is not
|
||||||
|
thread-safe. It is better to use <literal>MD5</literal> encryption,
|
||||||
|
which is guarantted to be thread-safe on all platforms.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.16 2002/01/06 18:12:00 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.17 2002/01/18 20:32:54 momjian Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -57,7 +57,10 @@ PostgreSQL documentation
|
|||||||
<term>-t</term>
|
<term>-t</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Turn on auto-commit of transactions.
|
Turn on auto-commit of transactions. In this mode, each query is
|
||||||
|
automatically committed unless it is inside an explicit
|
||||||
|
transaction block. In the default mode, queries are committed
|
||||||
|
only when <command>exec sql commit</command> is issued.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -404,32 +407,6 @@ EXEC SQL COMMIT;
|
|||||||
missing features.
|
missing features.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!--
|
|
||||||
.SH FILES
|
|
||||||
.PD 0
|
|
||||||
.TP
|
|
||||||
.B /usr/src/pgsql/postgresql-${ver}/src/interfaces...
|
|
||||||
./ecpg/include.......source for \fIecpg\fP header files.
|
|
||||||
./ecpg/lib...........source for \fIecpg\fP libraries.
|
|
||||||
./ecpg/preproc.......source for \fIecpg\fP header files.
|
|
||||||
./ecpg/test..........source for \fIecpg\fP libraries.
|
|
||||||
(test contains examples of syntax for ecpg SQL-C.)
|
|
||||||
.PD
|
|
||||||
.TP
|
|
||||||
.B /usr/local/pgsql/bin
|
|
||||||
\fIPostgreSQL\fP binaries including \fIecpg\fP.
|
|
||||||
.PD
|
|
||||||
.TP
|
|
||||||
.B /usr/local/pgsql/include
|
|
||||||
\fIPostgreSQL\fP headers including \fIecpglib.h\fP \fIecpgtype.h\fP
|
|
||||||
and \fIsqlca.h\fP.
|
|
||||||
.PD
|
|
||||||
.TP
|
|
||||||
.B /usr/local/pgsql/lib
|
|
||||||
\fIPostgreSQL\fP libraries including \fIlibecpg.a\fP and
|
|
||||||
\fIlibecpg.so\fP.
|
|
||||||
-->
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user