On Fri, 2003-09-26 at 23:18, Bruce Momjian wrote:
> If you are loading from pg_dump, you have lots of copy commands, so how
> do you know which COPY command caused the failure.  You just have the
> line number of _a_ copy.

I would recommend using
  psql -e
so that the sql commands are output too.

Here is a documentation patch:

Index: backup.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/backup.sgml,v
retrieving revision 2.30
diff -c -r2.30 backup.sgml
*** backup.sgml 31 Aug 2003 17:32:18 -0000      2.30
--- backup.sgml 27 Sep 2003 05:45:04 -0000
***************
*** 100,106 ****
      be read in by the <application>psql</application> program. The
      general command form to restore a dump is
  <synopsis>
! psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable 
class="parameter">infile</replaceable>
  </synopsis>
      where <replaceable class="parameter">infile</replaceable> is what
      you used as <replaceable class="parameter">outfile</replaceable>
--- 100,106 ----
      be read in by the <application>psql</application> program. The
      general command form to restore a dump is
  <synopsis>
! psql -f <replaceable class="parameter">infile</replaceable> -d <replaceable 
class="parameter">dbname</replaceable> 
  </synopsis>
      where <replaceable class="parameter">infile</replaceable> is what
      you used as <replaceable class="parameter">outfile</replaceable>
***************
*** 112,117 ****
--- 112,124 ----
      <application>psql</> supports similar options to <application>pg_dump</> 
      for controlling the database server location and the user name. See
      its reference page for more information.
+    </para>
+ 
+    <para>
+     With a large dump, it may be difficult to identify where any errors are
+     occurring.  You may use the -e option to psql to print the SQL commands
+     as they are run, so that it is easy to see precisely which commands are
+     causing errors.
     </para>
  
     <para>

-- 
Oliver Elphick                                [EMAIL PROTECTED]
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "My brethren, count it all joy when ye fall into
      various trials, Knowing that the testing of your faith
      produces endurance."          James 1:2,3 


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to