Re: "invalid input syntax for integer" for number with exponent

From: Bzzzz <lazyvirus(at)gmx(dot)com>
To: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: "invalid input syntax for integer" for number with exponent
Date: 2018-02-28 21:24:20
Message-ID: 20180228222420.069510a6@msi.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 28 Feb 2018 21:16:37 +0000
Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2018-02-28 21:59:15 Re: "invalid input syntax for integer" for number with exponent
Previous Message Stephen Froehlich 2018-02-28 21:16:37 "invalid input syntax for integer" for number with exponent