Bug with SQL-COPY in 7.2

Поиск
Список
Период
Сортировка
От Detlef Plotzky
Тема Bug with SQL-COPY in 7.2
Дата
Msg-id 200202151407.g1FE7Gv24878@apollo.bvu.de
обсуждение исходный текст
Список pgsql-bugs
Hi,
trying to import an ascii file with the sql copy statement
fails in the pg_atoi routine
   if the last field is "int"
 and
   if the ascii file has DOS line endings (cr=0x0d and lf=0x0a).

The main problem is the error message: you cannot detect
the cr on the screen, you see only a "unknown" error.

Example of sql session:


shell> psql testdb postgres

testdb=# \d telefon
               Table "telefon"
 Column |          Type          | Modifiers
--------+------------------------+-----------
 name   | character varying(255) |
 nr     | character varying(63)  |
 email  | character varying(63)  |
 dummy  | integer                |

testdb=# copy telefon from '/tmp/tel.asc' delimiters '|' ;
": can't parse "ne 1, pg_atoi: error in "12345
testdb=#\q

The data file tel.asc of the example is packed in the zip file
in the attachment.

Kind regards
Detlef


Вложения

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

Предыдущее
От: David Goodenough
Дата:
Сообщение: (JDBC) KEY_SEQ in Foreign Key result set starts at 0, should be 1
Следующее
От: Chris Sutton
Дата:
Сообщение: rename column and trigger on column