1- <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.21 2001/11/28 20:49 :10 petere Exp $ -->
1+ <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.22 2002/02/11 00:14 :10 tgl Exp $ -->
22
33<refentry id="APP-PGRESTORE">
44 <docinfo>
@@ -513,13 +513,25 @@ connectDBStart() -- connect() failed: No such file or directory
513513 Notes
514514 </title>
515515
516+ <para>
517+ If your installation has any local additions to the template1 database,
518+ be careful to load the output of <command>pg_restore</command> into a
519+ truly empty database; otherwise you are likely to get errors due to
520+ duplicate definitions of the added objects. To make an empty database
521+ without any local additions, copy from template0 not template1,
522+ for example:
523+ <programlisting>
524+ CREATE DATABASE foo WITH TEMPLATE = template0;
525+ </programlisting>
526+ </para>
527+
516528 <para>
517529 The limitations of <command>pg_restore</command> are detailed below.
518530
519531 <itemizedlist>
520532 <listitem>
521533 <para>
522- When restoring data to a table, <command>pg_restore</command> emits queries
534+ When restoring data to a pre-existing table, <command>pg_restore</command> emits queries
523535 to disable triggers on user tables before inserting the data then emits queries to
524536 re-enable them after the data has been inserted. If the restore is stopped in the
525537 middle, the system catalogs may be left in the wrong state.
@@ -538,7 +550,7 @@ connectDBStart() -- connect() failed: No such file or directory
538550
539551 <para>
540552 See the <xref linkend="app-pgdump"> documentation for details on
541- limitation of <command>pg_dump</command>.
553+ limitations of <command>pg_dump</command>.
542554 </para>
543555 </refsect1>
544556
0 commit comments