Re: Copy can't parse a float?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Dan Quaroni <dquaroni(at)OPENRATINGS(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Copy can't parse a float?
Date: 2005-02-23 08:18:16
Message-ID: 20050223081816.GA23608@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-02-23 08:59:58 Re: Support for RETURNING xxx INTO yyy for INSERT and UPDATE?
Previous Message Jason Earl 2005-02-23 07:09:45 Re: Bad Boolean external represenation *HELP*!