COPY Error Message is Confusing

From: "Bryan White" <bryan(at)arcamax(dot)com>
To: "pgsql-general" <pgsql-general(at)postgreSQL(dot)org>
Subject: COPY Error Message is Confusing
Date: 2002-04-10 16:02:40
Message-ID: 006f01c1e0a9$248538d0$2000a8c0@bryan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jillian Carroll 2002-04-10 16:18:09 PGAdmin
Previous Message Lee Kindness 2002-04-10 16:00:59 Re: Postgresql 7.2