|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.172 2006/10/23 18:10:32 petere Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.173 2006/10/31 01:52:31 neilc Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -94,9 +94,10 @@ PostgreSQL documentation
|
94 | 94 | <para>
|
95 | 95 | If the command string contains multiple SQL commands, they are
|
96 | 96 | processed in a single transaction, unless there are explicit
|
97 |
| - BEGIN/COMMIT commands included in the string to divide it into |
98 |
| - multiple transactions. This is different from the behavior when |
99 |
| - the same string is fed to <application>psql</application>'s standard input. |
| 97 | + <command>BEGIN</>/<command>COMMIT</> commands included in the |
| 98 | + string to divide it into multiple transactions. This is |
| 99 | + different from the behavior when the same string is fed to |
| 100 | + <application>psql</application>'s standard input. |
100 | 101 | </para>
|
101 | 102 | </listitem>
|
102 | 103 | </varlistentry>
|
@@ -472,9 +473,14 @@ PostgreSQL documentation
|
472 | 473 | <option>-f</> option, adding this option wraps
|
473 | 474 | <command>BEGIN</>/<command>COMMIT</> around the script to execute it
|
474 | 475 | 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!) |
| 476 | + complete successfully, or no changes are applied. |
| 477 | + </para> |
| 478 | + |
| 479 | + <para> |
| 480 | + If the script itself uses <command>BEGIN</>, <command>COMMIT</> |
| 481 | + or any command that cannot be executed inside a transaction |
| 482 | + block, specifying this option will cause the transaction to be |
| 483 | + aborted. |
478 | 484 | </para>
|
479 | 485 | </listitem>
|
480 | 486 | </varlistentry>
|
|
0 commit comments