Re: Copy can't parse a float? - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: Copy can't parse a float?
Date
Msg-id 20050223081816.GA23608@winnie.fuhr.org
Whole thread Raw
In response to Copy can't parse a float?  ("Dan Quaroni" <dquaroni@OPENRATINGS.com>)
List pgsql-novice
On Fri, Feb 18, 2005 at 10:05:09AM -0500, Dan Quaroni wrote:

> ERROR:  copy: line 1, pg_atoi: error in "1.0": can't parse ".0"
>
> Why can't it parse .0 in a float8?

It's not trying to parse a float8 -- it's trying to parse an integer
(pg_atoi), so I'd guess that the table has another column that
you're not considering.  I'll also guess that you're using PostgreSQL
7.3.x, since later versions print more context:

psql:foo.sql:16: ERROR:  invalid input syntax for integer: "1.0"
CONTEXT:  COPY foo, line 1, column f6: "1.0"

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-novice by date:

Previous
From: Jason Earl
Date:
Subject: Re: Bad Boolean external represenation *HELP*!
Next
From: Michael Fuhr
Date:
Subject: Re: Support for RETURNING xxx INTO yyy for INSERT and UPDATE?