Re: "invalid input syntax for integer" for number with exponent - Mailing list pgsql-novice

From Bzzzz
Subject Re: "invalid input syntax for integer" for number with exponent
Date
Msg-id 20180228222420.069510a6@msi.defcon1
Whole thread Raw
In response to "invalid input syntax for integer" for number with exponent  (Stephen Froehlich <s.froehlich@cablelabs.com>)
Responses Re: "invalid input syntax for integer" for number with exponent  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-novice
On Wed, 28 Feb 2018 21:16:37 +0000
Stephen Froehlich <s.froehlich@cablelabs.com> wrote:

> I'm getting the following error when trying to go from R to a bigint
> field in PostgreSQL.
> 
> COPY invalid input syntax for integer: "1.12589990684262e+015"
> 
> Do I need to convert the number into text manually in R?  Exactly what
> about this input is confusing PostgreSQL?

Take a closer look at this number: is it a FLOAT, not an integer, thus
you get an error trying to insert a float in an integer column.

JY


pgsql-novice by date:

Previous
From: Stephen Froehlich
Date:
Subject: "invalid input syntax for integer" for number with exponent
Next
From: "David G. Johnston"
Date:
Subject: Re: "invalid input syntax for integer" for number with exponent