COPY Error Message is Confusing - Mailing list pgsql-general

From Bryan White
Subject COPY Error Message is Confusing
Date
Msg-id 006f01c1e0a9$248538d0$2000a8c0@bryan
Whole thread Raw
Responses Re: COPY Error Message is Confusing
List pgsql-general
I just spent the morning chasing down a small data corruption.  It showed up
when loading a database from the output of a dump.  The error message was:

    copy: line 8590351, Bad date external representation '04-0| '

I suggest this be changed to:

    copy: input tuple 8590351, Bad date external representation '04-0| '

After investigating this it turns out the number reported is a 1-based input
record number.  Referring to it as a line number is very confusing because
records may span line boundaries.  The following other interpretations are
credible:
    A line number in the dump file
    A line number relative to the start of the COPY.

It would also be useful to report the name of the table being copied to.  It
would be really useful if it would output the offending input line(s)
content though that might have security related issues.


---------
Bryan White, ArcaMax.com, VP of Technology
This email represents the consensus opinion
of the many voices in my head.



pgsql-general by date:

Previous
From: Lee Kindness
Date:
Subject: Re: Postgresql 7.2
Next
From: "Jillian Carroll"
Date:
Subject: PGAdmin