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 $ -->
2
2
3
3
<refentry id="APP-PGRESTORE">
4
4
<docinfo>
@@ -513,13 +513,25 @@ connectDBStart() -- connect() failed: No such file or directory
513
513
Notes
514
514
</title>
515
515
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
+
516
528
<para>
517
529
The limitations of <command>pg_restore</command> are detailed below.
518
530
519
531
<itemizedlist>
520
532
<listitem>
521
533
<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
523
535
to disable triggers on user tables before inserting the data then emits queries to
524
536
re-enable them after the data has been inserted. If the restore is stopped in the
525
537
middle, the system catalogs may be left in the wrong state.
@@ -538,7 +550,7 @@ connectDBStart() -- connect() failed: No such file or directory
538
550
539
551
<para>
540
552
See the <xref linkend="app-pgdump"> documentation for details on
541
- limitation of <command>pg_dump</command>.
553
+ limitations of <command>pg_dump</command>.
542
554
</para>
543
555
</refsect1>
544
556
0 commit comments