Re: COPY-ing ASCII file into UTF-8 database

From: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>
To: Toomas Vendelin <pg(at)vendelin(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: COPY-ing ASCII file into UTF-8 database
Date: 2009-04-06 06:55:37
Message-ID: 49D9A769.8020609@usit.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Toomas Vendelin wrote:
>
> MY QUESTIONS:
>
> 1. What is the proper solution for importing data from plain ASCII
> files, that contain the type of characters mentioned above?

Set the correct client_encoding, before importing. Presumably the
Estonian characters are part of one of the flavours of LATIN 1-9

> SET CLIENT_ENCODING='LATIN<X>'; -- Where you substitute <X> for the
correct number
> \copy ....

--
Tommy Gildseth

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dimitri Fontaine 2009-04-06 09:36:32 Re: how to do prefix_range default value?
Previous Message Toomas Vendelin 2009-04-06 06:28:01 COPY-ing ASCII file into UTF-8 database