Copy can't parse a float?

From: "Dan Quaroni" <dquaroni(at)OPENRATINGS(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Copy can't parse a float?
Date: 2005-02-18 15:05:09
Message-ID: 9951857AC27D97449C62F7DD6C6122481D95A9@ponyexpress2.ad.openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm trying to copy into a table from a file, and postgres is complaining about a float value.... The table is as follows:

smallint,
smallint,
int,
smallint,
smallint,
integer,
float8

And the data file looks like:

2|11|30540|1|2||1.0
2|12|30540|1|1||0.0
2|13|30540|1|1||1.0
2|14|30540|1|1||1.0
2|15|30540|1|1||0.0

Here's my copy command:

echo "copy fact from '/data1/fact_oriZ01_2004.dat' with delimiter as '|' null as ''" | psql -d oridb

And it's dying on the first line with this error:

ERROR: copy: line 1, pg_atoi: error in "1.0": can't parse ".0"

Why can't it parse .0 in a float8?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Eduardo Vázquez Rodríguez 2005-02-19 02:21:54 Query optimization
Previous Message Chari Clark 2005-02-17 20:25:58 PostgreSQL Errors...