Skip to content

Commit d537e0b

Browse files
committed
Improve documentation of --single-transaction option: fix markup, and
don't promise more than the code actually delivers.
1 parent f5ef3d4 commit d537e0b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

doc/src/sgml/ref/pg_restore.sgml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.57 2006/02/12 04:04:32 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.58 2006/02/13 21:29:08 tgl Exp $ -->
22

33
<refentry id="APP-PGRESTORE">
44
<refmeta>
@@ -454,9 +454,11 @@
454454
<term><option>--single-transaction</option></term>
455455
<listitem>
456456
<para>
457-
Force the restore to execute as a single transaction. Either all
458-
SQL statements complete successfully, or no changes are applied. This
459-
option also forces --exit-on-error.
457+
Execute the restore as a single transaction (that is, wrap the
458+
emitted commands in <command>BEGIN</>/<command>COMMIT</>). This
459+
ensures that either all the commands complete successfully, or no
460+
changes are applied. This option implies
461+
<option>--exit-on-error</>.
460462
</para>
461463
</listitem>
462464
</varlistentry>

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.159 2006/02/12 04:04:32 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.160 2006/02/13 21:29:08 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -468,9 +468,13 @@ PostgreSQL documentation
468468
<term><option>--single-transaction</option></term>
469469
<listitem>
470470
<para>
471-
When psql executes a script with the -f option, this additional option
472-
will force the script to execute as a single transaction. Either all
473-
SQL statements complete successfully, or no changes are applied.
471+
When <application>psql</application> executes a script with the
472+
<option>-f</> option, adding this option wraps
473+
<command>BEGIN</>/<command>COMMIT</> around the script to execute it
474+
as a single transaction. This ensures that either all the commands
475+
complete successfully, or no changes are applied. (However, if the
476+
script itself uses <command>BEGIN</> or <command>COMMIT</>, this
477+
option will not have the desired effect!)
474478
</para>
475479
</listitem>
476480
</varlistentry>

0 commit comments

Comments
 (0)