Problem with COPY FROM

From: "Jay O'Connor" <joconnor(at)cybermesa(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem with COPY FROM
Date: 2003-05-28 17:31:00
Message-ID: 20030528103100.A1467@altaica
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to bulk load a table from a data file using a 'COPY FROM'
command.

I'm getting an error saying that there is "Extra data after last expected
column" (on the first line)

I'm using a full column list in the copy from:
COPY tablename (col1, col2, col3..)

and the number of columns matches the number of tab delimited fields in the
file, so my guess right now is that I'm not properly marking the end of
row. I've tride using carraig returns, line feeds, and even hust putting
in the strings "\n\r" at the end in various combinations.

So what is the proper way of ending a line in a file you expect to feed in
to "COPY FROM"...

Otherwise, I may have to post the full command and a snippet from the file
and hope someone can see something I'm missing

Thanks

Take care,
Jay

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2003-05-28 18:09:01 Re: Lock table
Previous Message Jim C. Nasby 2003-05-28 17:07:52 Re: Bizzare plpgsql error