Peter Eisentraut wrote:
> Oliver Elphick writes:
> 
> > +    <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>
> 
> That is just not true.  If you use -f, it will tell you the line number of
> the command causing the error.  Add the line number of the COPY error
> message, there you have it.

You are assuming it is easy to find what is on a specific line of the
dump file.  I am not sure that is always easy for people with limited
Unix skills, or MSWin folks.  I am not sure I would have thought to add
the file offset to find the problem COPY line.  I guess I would have
eventually, but it wouldn't have been my first idea, and I might _not_
have used -f on the load, and if the load took an hour, I would have to
run it again to get that line number.

I can see the point that the table name is only really valuable when you
are loading a dump, and not valuabvle when you are just doing a copy. 
However, copy is used enought in dumps that the exta word (the table
name) doesn't see to hurt.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to