On Sat, 2005-12-17 at 20:03 +0100, Peter Eisentraut wrote: > Simon Riggs wrote: > > Changes as discussed. "singletransaction.patch" attached. > > I meant to ask, why is this not the default or only behavior?
Historically, it didn't work that way, so I hadn't thought to change that behaviour. We could I suppose... but I'm happy with just an option to do --single-transaction. > Your > patch does not contain a documentation update, and so the user has no > information about why to use this option or not. I was waiting for tech approval of the patch before writing the docs. A doc patch is enclosed. Best Regards, Simon Riggs
Index: doc/src/sgml/ref/pg_restore.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v retrieving revision 1.56 diff -c -r1.56 pg_restore.sgml *** doc/src/sgml/ref/pg_restore.sgml 1 Nov 2005 21:09:50 -0000 1.56 --- doc/src/sgml/ref/pg_restore.sgml 18 Dec 2005 18:51:57 -0000 *************** *** 448,453 **** --- 448,466 ---- </para> </listitem> </varlistentry> + + <varlistentry> + <term><option>-1</option></term> + <term><option>--single-transaction</option></term> + <listitem> + <para> + Force the restore to execute as a single transaction. Either all + SQL statements complete successfully, or no changes are applied. This + option also forces --exit-on-error. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> Index: doc/src/sgml/ref/psql-ref.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v retrieving revision 1.155 diff -c -r1.155 psql-ref.sgml *** doc/src/sgml/ref/psql-ref.sgml 9 Dec 2005 19:19:17 -0000 1.155 --- doc/src/sgml/ref/psql-ref.sgml 18 Dec 2005 18:52:00 -0000 *************** *** 463,468 **** --- 463,480 ---- </listitem> </varlistentry> + <varlistentry> + <term><option>-1</option></term> + <term><option>--single-transaction</option></term> + <listitem> + <para> + When psql executes a script with the -f option, this additional option + will force the script to execute as a single transaction. Either all + SQL statements complete successfully, or no changes are applied. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><option>-?</></term> <term><option>--help</></term>
---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster