By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,662 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,662 IT Pros & Developers. It's quick & easy.

pgsql 7.4.1 copy - end-of-copy marker corrupt

P: n/a
I just upgraded to 7.4.1. I was loading my database using 'copy'. Some
tables loaded with no problem, while some gave me the error:
===
ERROR: end-of-copy marker corrupt
CONTEXT: COPY author, line 49: "49\aoD{\BABABABABARENG
\t5p.\19840426"
===

This is the load script:
===
\set AUTOCOMMIT off
COPY author FROM '/tmp/author.data' USING DELIMITERS '\\';
commit;

and this is the line in the data file it complains:
===
49\aoD{\BABABABABARENG
\t5p.\19840426\.XfqWM+Ke,8+Ae-9PWPn)}#6eVa_QuNi*%{Y[?ip]Gx]6i-H[W&8K$dp/}uk57Dl6].*IdV 5(Lxl?4bS5~yhyY18(WcoZ fl,Lutg^Ok[@-H0hvU2J1lhReln7}/|qjH1O0T: }D!,Lvc6^PAg04);Es=Op~4{FrX|.PM_T+ 03xVi#s bL(VPZczAbTJg.ht]w6.A%Q0g%H pz~*!CXKb-9xLN7%eDWqzN7=]{lt1ssbG$HB^0hblc}(pvvFyDv

I think this is strange since I've loaded the tables with the same
datafile and same command (except for the autocommit part) in 7.3.3 with
no problem. Even in 7.4.1, I have some tables loaded successfully.

Can someone tell me what I did wrong or copy is buggy?

Thanks,
Jenny
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Jenny Zhang <je***@osdl.org> writes:
ERROR: end-of-copy marker corrupt
CONTEXT: COPY author, line 49: "49\aoD{\BABABABABARENG
\t5p.\19840426" and this is the line in the data file it complains:
===
49\aoD{\BABABABABARENG
\t5p.\19840426\.XfqWM+Ke,8+Ae-9PWPn)}#6eVa_Qu ...

^^

It doesn't like the "\.", with good reason I should think. Are you sure
7.3 would take this file?

Anyway, either double or remove that backslash, depending on what you
want.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #2

P: n/a
On Fri, Feb 06, 2004 at 01:11:24AM -0500, Tom Lane wrote:
Jenny Zhang <je***@osdl.org> writes:
ERROR: end-of-copy marker corrupt
CONTEXT: COPY author, line 49: "49\aoD{\BABABABABARENG
\t5p.\19840426"
and this is the line in the data file it complains:
===
49\aoD{\BABABABABARENG
\t5p.\19840426\.XfqWM+Ke,8+Ae-9PWPn)}#6eVa_Qu ...

^^

It doesn't like the "\.", with good reason I should think. Are you sure
7.3 would take this file?

Anyway, either double or remove that backslash, depending on what you
want.


Umm, the copy is using the escape character as column seperator. I wonder if
we should catch and warn for that.

I don't think there is a sensible way that can actually work.

--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ (... have gone from d-i being barely usable even by its developers
anywhere, to being about 20% done. Sweet. And the last 80% usually takes
20% of the time, too, right?) -- Anthony Towns, debian-devel-announce


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAIzmaY5Twig3Ge+YRAtF3AKDANitJS7hAzt0YYMJkFS ac0bK56gCfTQCp
dCgNgorHnzgn74icuS/mnnA=
=mY8k
-----END PGP SIGNATURE-----

Nov 22 '05 #3

P: n/a
On Thu, 2004-02-05 at 22:52, Martijn van Oosterhout wrote:
On Fri, Feb 06, 2004 at 01:11:24AM -0500, Tom Lane wrote:
Jenny Zhang <je***@osdl.org> writes:
ERROR: end-of-copy marker corrupt
CONTEXT: COPY author, line 49: "49\aoD{\BABABABABARENG
\t5p.\19840426"

and this is the line in the data file it complains:
===
49\aoD{\BABABABABARENG
\t5p.\19840426\.XfqWM+Ke,8+Ae-9PWPn)}#6eVa_Qu ...

^^

It doesn't like the "\.", with good reason I should think. Are you sure
7.3 would take this file?

Anyway, either double or remove that backslash, depending on what you
want.


Umm, the copy is using the escape character as column seperator. I wonder if
we should catch and warn for that.

I don't think there is a sensible way that can actually work.


Using \ as delimiter is a bad choice. But it did work under 7.3.3.
It would be nice to have an error message for it.

Thanks,
Jenny
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.