Re: [GENERAL] PostgreSQL: copying data from file

From: Oleg Broytmann <phd(at)sun(dot)med(dot)ru>
To: Dmitry Iv Popov <mitlas(at)auricvision(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] PostgreSQL: copying data from file
Date: 1998-11-27 13:06:01
Message-ID: Pine.SOL2.3.96.SK.981127160308.2476E-100000@sun.med.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

On Thu, 26 Nov 1998, Dmitry Iv Popov wrote:
> Well, now I have the following problem: base exported from
> VFoxPro (with delimiters '|') contains russian characters
> and command 'copy' produces the error:
>
> // unreadable symbols are russian letters
> rscexamdb=> copy exam with oids from '/opt2/home3/auricvision/db.txt'
> using delimiters '|';
> WARN:pg_atoi: error in "й РПЕЛ НЯМНБМШЛ РХОЮЛ ХМБЕЯРХЖХНММШУ
> ОПНДСЙРНБ ПШМЙЮ ЖЕММШУ АСЛЮЦ НРМНЯЪРЯЪ:": can't parse "й
> РПЕЛ НЯМНБМШЛ РХОЮЛ ХМБЕЯРХЖХНММШУ ОПНДСЙРНБ
> ПШМЙЮ ЖЕММШУ АСЛЮЦ НРМНЯЪРЯЪ:"
> rscexamdb=>

Looks strange. I am using postgres with russian with great success:

COPY positions FROM stdin USING DELIMITERS '|';
1|ЯБХМХМЮ|1|"5 days"|15|1|A
2|ЦНБЪДХМЮ|1|"5 days"|15|2|A
3|ЛНКНЙН|2|"5 days"|15|3|A
4|ЬНЙНКЮД|4|"5 days"|15|4|A
5|ОЕКЭЛЕМХ|1|"5 days"|15|5|A
\.

This work fine, and I have never experienced any problem with "foreign"
letters.

Oleg.
----
Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/
Programmers don't die, they just GOSUB without RETURN.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1998-11-27 13:22:48 New Mailing List...
Previous Message Felix Roske 1998-11-27 12:22:11