Обсуждение: COPY ERROR
Hi all,
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 '/usr/local/pgsql/data/base.txt';
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?
Regards
Paul
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 '/usr/local/pgsql/data/base.txt';
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?
Regards
Paul
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
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 > '/usr/local/pgsql/data/base.txt'; > 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? Yours, Laurenz Albe
Txt file,
I belive that file not put \n on the end of line,this is possible?
follow example in attach.
I belive that file not put \n on the end of line,this is possible?
follow example in attach.
De: Albe Laurenz <laurenz.albe@wien.gv.at>
Para: paulo matadr *EXTERN* <saddoness@yahoo.com.br>; GENERAL <pgsql-general@postgresql.org>
Enviadas: Terça-feira, 30 de Março de 2010 4:03:51
Assunto: Re: [GENERAL] COPY ERROR
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
> '/usr/local/pgsql/data/base.txt';
> 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?
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Now attached.
----- Mensagem encaminhada ----
De: paulo matadr <saddoness@yahoo.com.br>
Para: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: GENERAL <pgsql-general@postgresql.org>
Enviadas: Quarta-feira, 31 de Março de 2010 11:03:01
Assunto: Res: [GENERAL] COPY ERROR
De: Albe Laurenz <laurenz.albe@wien.gv.at>
Para: paulo matadr *EXTERN* <saddoness@yahoo.com.br>; GENERAL <pgsql-general@postgresql.org>
Enviadas: Terça-feira, 30 de Março de 2010 4:03:51
Assunto: Re: [GENERAL] COPY ERROR
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
> '/usr/local/pgsql/data/base.txt';
> 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?
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
De: paulo matadr <saddoness@yahoo.com.br>
Para: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: GENERAL <pgsql-general@postgresql.org>
Enviadas: Quarta-feira, 31 de Março de 2010 11:03:01
Assunto: Res: [GENERAL] COPY ERROR
Txt file,
I belive that file not put \n on the end of line,this is possible?
follow example in attach.
I belive that file not put \n on the end of line,this is possible?
follow example in attach.
De: Albe Laurenz <laurenz.albe@wien.gv.at>
Para: paulo matadr *EXTERN* <saddoness@yahoo.com.br>; GENERAL <pgsql-general@postgresql.org>
Enviadas: Terça-feira, 30 de Março de 2010 4:03:51
Assunto: Re: [GENERAL] COPY ERROR
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
> '/usr/local/pgsql/data/base.txt';
> 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?
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes
Вложения
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