Skip site navigation (1) Skip section navigation (2)

Re: ERROR: invalid input syntax for integer:

From: James Hartley <jjhartley(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: ERROR: invalid input syntax for integer:
Date: 2011-09-22 00:33:41
Message-ID: CAKeNXXuxR37s-Tce1vxDApp-XmveZQqxhdrcXGg5mQZm0nmcyw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, Sep 21, 2011 at 4:04 PM, e-letter <inpost(at)gmail(dot)com> wrote:

> Using the command:
>
> \copy tablename from file.csv
>
> Causes the command terminal error:
>
>  input syntax for integer: "123456,2000-01-01,01:10,"sometext""
> CONTEXT:  COPY tablename, line 1, column column2: "123456
>
> What is my mistake please?
>

Within psql, the following works for me:

\COPY tablename FROM file.csv CSV HEADER

In response to

pgsql-novice by date

Next:From: e-letterDate: 2011-09-22 21:27:22
Subject: Re: ERROR: invalid input syntax for integer:
Previous:From: Tom LaneDate: 2011-09-22 00:07:04
Subject: Re: ERROR: invalid input syntax for integer:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group