Bug with SQL-COPY in 7.2

From: "Detlef Plotzky" <plo(at)bvu(dot)de>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Bug with SQL-COPY in 7.2
Date: 2002-02-15 14:07:16
Message-ID: 200202151407.g1FE7Gv24878@apollo.bvu.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
ascii.zip application/x-zip-compressed 216 bytes

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-02-15 15:21:52 Re: Bug #590: Migration to Postgres 7.2 impossible when capitals are used in database name
Previous Message pgsql-bugs 2002-02-15 12:06:07 Bug #590: Migration to Postgres 7.2 impossible when capitals are used in database name