Search Postgresql Archives

Re: COPY and Unicode...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Cristian Prieto" <cristian@xxxxxxxxxxxxxxx> writes:
> Hello, I need to import some amount of data using the COPY command, the main
> trouble I found is that the Database is in UNICODE format and the data in
> ASCII Latin-1 codepage, when I try to import it, COPY respond with:

> ERROR:  invalid byte sequence for encoding "UNICODE": 0xe9
> CONTEXT:  COPY geoip_location, line 307, column city: "Yaound"

> I've been looking into the documentation and I could not found any reference
> in copy from a distinct codepage than the used by the database, any help?

Try doing "SET client_encoding = latin1" before doing the COPY.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux