ERROR: end-of-copy marker corrupt

From: Wes <wespvp(at)syntegra(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: ERROR: end-of-copy marker corrupt
Date: 2006-03-21 14:53:33
Message-ID: C0456F8D.21409%wespvp@syntegra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Version: 8.1.3
System: RedHat Linux 3.0 ES

In doing a bulk load with libpq (PQexec, PQputCopyData, PQputCopyEnd), the
COPY is failing with:

COPY (d) command did not complete successfully:
ERROR: end-of-copy marker corrupt CONTEXT: COPY detail, line 47201: ""

There are 50,000 lines in this transaction, so this is not the last line.
Other postings indicate this is from a '\.'. On line 47201, I do see a '\.'
embedded in the middle of the line. The documentation states that this
should be a problem only if those are the only two characters on a line.

A posting from December 2005 against 8.1.0 (bug #2114) seems to indicate
this should be fixed.

Am I missing something, or is there still a problem? Do I still need to
change '\.\ to '\\.'?

Should I be using PQescapeString on strings being passed to COPY?

Wes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2006-03-21 15:10:53 Re: What's a good default encoding?
Previous Message Wayne Schroeder 2006-03-21 14:44:21 Actual age() of cleanly vacuumed db