Re: copy 5.3000000000e+01 to bigint column error while Insert ok

From: Jov <amutu(at)amutu(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: copy 5.3000000000e+01 to bigint column error while Insert ok
Date: 2013-10-29 08:27:34
Message-ID: CADyrUxM5F30CxGWVzbFeo7LdNz2A7nwWK7NUPY9NPa7UVA8nbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thanks,that make sense.changing the column type from bigint to double
pecision solves the problem.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

2013/10/29 John R Pierce <pierce(at)hogranch(dot)com>

> On 10/28/2013 11:34 PM, Jov wrote:
>
> when use insert command,we can insert 5.3000000000e+01 to table,but when
> use copy command,we get this:
> ERROR: invalid input syntax for integer: "'5.3000000000e+01'"
> CONTEXT: COPY tdsort_metrics, line 1, column monitor_value:
> "'5.3000000000e+01'"
>
> any idea?
>
>
> that number is clearly a floating point number. INSERT takes
> expressions, and will cast the float to bigint, COPY doesn't and won't.
>
>
> --
> john r pierce 37N 122W
> somewhere on the middle of the left coast
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rahila Syed 2013-10-29 08:51:22 Increasing CPU usage of PostgreSQL
Previous Message John R Pierce 2013-10-29 06:49:11 Re: copy 5.3000000000e+01 to bigint column error while Insert ok