Re: Problem with COPY

From: Brauner Oliveira <brauner(dot)rno(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problem with COPY
Date: 2013-07-03 14:05:04
Message-ID: CADV88-qx6fggR=AKsoQPuaRoxAWpaxG4sx2ooQrpY88JViQ6tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us>

> Brauner Oliveira <brauner(dot)rno(at)gmail(dot)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
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Birchall, Austen 2013-07-03 15:37:29 Is it possible to start PostgreSQL in 'restrict' mode
Previous Message Tom Lane 2013-07-03 13:51:44 Re: Problem with COPY