integer import problem

Поиск
Список
Период
Сортировка
От Keller, Oliver
Тема integer import problem
Дата
Msg-id 9050BAD35AE6104D91C1984F32EB0C4601AFF8FADBCB@EXCHANGE-01.zdv.uni-mainz.de
обсуждение исходный текст
Список pgsql-admin

hi all,

since several days I try to import some ascii data into my postgresql 8.4 (under Win Vista SP1) database.

I use the copy command under pgAdmin III. This is some example data (from an UTF-8 encoded textfile):

1| 3.7200001E-01| 1.0000000E+00|S

2| 1.2400000E+00| 1.0000000E+01|S

3| 9.4199997E-01| 1.0000000E+02|S

4| 1.1200000E+00| 1.0000000E+03|S

5| 8.1800002E-01| 1.6667000E+02|M

6| 9.9400002E-01| 2.7780001E+01|H

7| 3.7200001E-01| 2.7779999E+02|H

8| 3.7200001E-01| 1.1570000E+02|D

 

This is the table structure:

CREATE TABLE tableName (

    fs_id integer NOT NULL,

    fs_sat real NOT NULL,

    fs_hval real NOT NULL,

    fs_hunit character(1) NOT NULL

);

 

This is the copy command:

COPY tableName FROM 'C:/Users/postgres/Documents/import_tableName.txt' DELIMITERS '|';

 

When I execute it I get the following error message (translated text):

Error: invalid input syntax for integer: »

CONTEXT:  COPY tableName, row 1, column fs_id: »

SQL state:22P02

 

psql tells me that the client-encoding is utf-8:

postgres=# \encoding

UTF8

 

I don’t have this problem with tables where no integers are in the first column.

My question is now: what's wrong? Where comes this blank in front of the 1 in the error message from?

Thank you very much for any help!

Oliver

 

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to mask password when using ALTER USER syntax in psql.
Следующее
От: "Keller, Oliver"
Дата:
Сообщение: FW: integer import problem