Hi, I've had problems using pg_restore --data-only when restoring individual schemas (which contain data which has had bad things done to it). --clean does not work well because of dependent objects in other schemas.
Patch to the docs attached (before I go and do any real coding.) Karl <k...@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index b276da6..94d359d 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -539,6 +539,26 @@ </varlistentry> <varlistentry> + <term><option>-u</></term> + <term><option>--truncate-tables</></term> + <listitem> + <para> + This option is only relevant when performing a data-only + restore. It instructs <application>pg_restore</application> + to execute commands to truncate the target tables while the + data is reloaded. Use this when restoring tables or schemas + and <option>--clean</clean> cannot be used because dependent + objects would be destroyed. + </para> + + <para> + The <option>--disable-triggers</option> will almost always + always need to be used in conjunction with this option to + disable check constraints on foreign keys. + </para> + </varlistentry> + + <varlistentry> <term><option>--use-set-session-authorization</option></term> <listitem> <para>
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers