PostgreSQL: copying data from file

From: Dmitry Iv Popov <mitlas(at)auricvision(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: PostgreSQL: copying data from file
Date: 1998-11-26 19:45:53
Message-ID: 365DAFF0.AC4FF065@auricvision.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

great thanks to Paul Ramsey, Mr. Ramaswamy, Ulf Mehlig and
Peter Mount for their useful advices!

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=>

exam is table with fields char(1024), char(100), char(100),
char(100), char(100), int, int, int, int, int, int and I
can't imagine why the error is in 'pg_atoi' function -
it seems to be postgres tryes to convert first string of
data file to integer (althrouh first field in the table is
char(1024))!

What should I do with it? May be I should use copy the
file as binary one?

P.S.: command '\copy' (\copy exam from db.txt) in psql says
'Broken pipe.' and just quits.

--
BEST WISHES, Mitlas
Webmaster, Auric Vision Ltd.
http://www.auricvision.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1998-11-27 03:45:05 WWW based IMAP reader...
Previous Message Paul van Erk 1998-11-26 16:21:27 A database on the Macintosh and Windows