Re: Problem with COPY - Mailing list pgsql-novice

From Brauner Oliveira
Subject Re: Problem with COPY
Date
Msg-id CADV88-qx6fggR=AKsoQPuaRoxAWpaxG4sx2ooQrpY88JViQ6tg@mail.gmail.com
Whole thread Raw
In response to Re: Problem with COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
I used Notepad++ and converted the file to UTF-8. But, there's an option to "Convert to UTF-8 without BOM". This time, i used it and worked.

Thank you.

2013/7/3 Tom Lane <tgl@sss.pgh.pa.us>
Brauner Oliveira <brauner.rno@gmail.com> writes:
> ERROR: value too long for type character varying(8)
> SQL state: 22001
> Context: COPY $tablename, line 1, column $colum_name: "69900900"

Is that the first field of the first line?

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

I'm suspicious that you prepared the file in some text editor that
"helpfully" inserted an invisible BOM (byte order mark) character at the
start of the file.  Windows editors in particular seem to think this is
a good idea.

                        regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with COPY
Next
From: "Birchall, Austen"
Date:
Subject: Is it possible to start PostgreSQL in 'restrict' mode