Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9600cca

Browse files
committed
Improve description of autocommit behavior in ecpg manual pages.
1 parent69f909b commit9600cca

File tree

3 files changed

+27
-41
lines changed

3 files changed

+27
-41
lines changed

‎doc/src/sgml/ecpg.sgml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.33 2002/01/07 02:29:11 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.34 2002/01/18 20:32:53 momjian Exp $
33
-->
44

55
<chapter id="ecpg">
@@ -1053,14 +1053,16 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ",
10531053
</para>
10541054

10551055
<para>
1056-
All <acronym>SQL</acronym> statements are performed in one
1057-
transaction unless you issue a commit transaction. To accomplish
1058-
this auto-transaction behavior, the first statement and the first
1059-
statement after a commit or rollback always begins a new transaction. To
1060-
disable this feature, use the <option>-t</option> command-line
1061-
option.
1056+
In the default mode, queries are committed only when <command>exec
1057+
sql commit</command> is issued. <application>Ecpg</application>
1058+
also supports auto-commit of transactions via the
1059+
<option>-t</option> command-line option or via the <literal>exec
1060+
sql set autocommit to on</literal> statement. In
1061+
<literal>autocommit<literal> mode, each query is automatically
1062+
committed unless it is inside an explicit transaction block. This
1063+
mode can be explicitly turned off using <literal>exec sql set
1064+
autocommit to off</literal>.
10621065
</para>
1063-
10641066
</sect2>
10651067
</sect1>
10661068
</chapter>

‎doc/src/sgml/libpq.sgml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.85 2002/01/07 02:29:12 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.86 2002/01/18 20:32:54 momjian Exp $
33
-->
44

55
<chapter id="libpq">
@@ -2109,10 +2109,17 @@ for information on correct values for these environment variables.
21092109
<para>
21102110
<filename>libpq</filename> is thread-safe as of
21112111
<productname>PostgreSQL</productname> 7.0, so long as no two threads
2112-
attempt to manipulate the same <structname>PGconn</> object at the same time. In particular,
2113-
you cannot issue concurrent queries from different threads through the same
2114-
connection object. (If you need to run concurrent queries, start up multiple
2115-
connections.)
2112+
attempt to manipulate the same <structname>PGconn</> object at the same
2113+
time. In particular, you cannot issue concurrent queries from different
2114+
threads through the same connection object. (If you need to run
2115+
concurrent queries, start up multiple connections.)
2116+
</para>
2117+
<para>
2118+
However, <filename>libpq</filename> clients using the
2119+
<literal>crypt</literal> encryption method rely on the
2120+
<literal>crypt()</literal> operating system function, which often is not
2121+
thread-safe. It is better to use <literal>MD5</literal> encryption,
2122+
which is guarantted to be thread-safe on all platforms.
21162123
</para>
21172124

21182125
<para>

‎doc/src/sgml/ref/ecpg-ref.sgml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.16 2002/01/06 18:12:00 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/ecpg-ref.sgml,v 1.17 2002/01/18 20:32:54 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -57,7 +57,10 @@ PostgreSQL documentation
5757
<term>-t</term>
5858
<listitem>
5959
<para>
60-
Turn on auto-commit of transactions.
60+
Turn on auto-commit of transactions. In this mode, each query is
61+
automatically committed unless it is inside an explicit
62+
transaction block. In the default mode, queries are committed
63+
only when <command>exec sql commit</command> is issued.
6164
</para>
6265
</listitem>
6366
</varlistentry>
@@ -404,32 +407,6 @@ EXEC SQL COMMIT;
404407
missing features.
405408
</para>
406409

407-
<!--
408-
.SH FILES
409-
.PD 0
410-
.TP
411-
.B /usr/src/pgsql/postgresql-${ver}/src/interfaces...
412-
./ecpg/include.......source for \fIecpg\fP header files.
413-
./ecpg/lib...........source for \fIecpg\fP libraries.
414-
./ecpg/preproc.......source for \fIecpg\fP header files.
415-
./ecpg/test..........source for \fIecpg\fP libraries.
416-
(test contains examples of syntax for ecpg SQL-C.)
417-
.PD
418-
.TP
419-
.B /usr/local/pgsql/bin
420-
\fIPostgreSQL\fP binaries including \fIecpg\fP.
421-
.PD
422-
.TP
423-
.B /usr/local/pgsql/include
424-
\fIPostgreSQL\fP headers including \fIecpglib.h\fP \fIecpgtype.h\fP
425-
and \fIsqlca.h\fP.
426-
.PD
427-
.TP
428-
.B /usr/local/pgsql/lib
429-
\fIPostgreSQL\fP libraries including \fIlibecpg.a\fP and
430-
\fIlibecpg.so\fP.
431-
-->
432-
433410
</refsect1>
434411
</refentry>
435412

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp