Re: Res: COPY ERROR - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Res: COPY ERROR
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2049EE2E0@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Enc: Res: COPY ERROR  (paulo matadr <saddoness@yahoo.com.br>)
List pgsql-general
paulo matadr wrote:
>>> When I try to import big file base.txt( 700MB),I get this:
>>>
>>> xxxxx=# create table arquivo_serasa_marco( varchar(3000));
>>> xxxxx=# COPY arquivo_serasa_marco from
>>>
>>> ERROR:  literal newline found in data
>>> HINT:  Use "\n" to represent newline.
>>> CONTEXT:  COPY arquivo_serasa_marco, line 2: ""
>>>
>>> How can find solution for this?
>>
>> The file does not seem to be in valid COPY format.
>>
>> What is the format of the file?
>
> Now attached.
>
> Txt file,
> I belive that  file not put \n on the end of line,this is possible?
>
> follow example in attach.

Works here:

test=# CREATE TABLE arquivo_serasa_marco(val varchar(3000));
CREATE TABLE
test=# COPY arquivo_serasa_marco FROM '/home/advpg/example.TXT';
COPY 2

This is PostgreSQL 8.4.2.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Running Windows on a Mac partition
Next
From: Anssi Kääriäinen
Date:
Subject: using gist index with dual-temporal timestamp values