Problem with COPY

From: Brauner Oliveira <brauner(dot)rno(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Problem with COPY
Date: 2013-07-03 13:07:33
Message-ID: CADV88-oMcsUeNCGzV_HEwCZeuN4p9wvdO=ShR3O3VFLMckL-4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I am trying to copy a table from a file:

COPY table FROM 'file/path/filename.csv' DELIMITER ';' CSV;

But I got this error:

ERROR: value too long for type character varying(8)
SQL state: 22001
Context: COPY $tablename, line 1, column $colum_name: "69900900"

Look that the length of the data (69900900) i want to copy fits the column
data type (varchar(8)). The length is exactly the same.

The file is well formatted and Encoded in UTF-8:

value1;value2;value3;value4

Someone know what i'm doing wrong?

Thank you.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2013-07-03 13:51:44 Re: Problem with COPY
Previous Message Bruce Momjian 2013-06-28 23:21:18 Re: [HACKERS] index refuses to build