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

When dealing with 'bigint'or 'int8', the command 'copy'doesn't work

From: "Dong, Meng" <eddy(at)securities(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: When dealing with 'bigint'or 'int8', the command 'copy'doesn't work
Date: 2001-08-01 10:18:15
Message-ID: (view raw or whole thread)
Lists: pgsql-bugs
Hi guys,

I meet a problem when try to import data from a Tab-delimited-text file to a table by command 'copy from'. A sample procedure is explained as follow,

first, I generate a file called  /home/temp/test.txt, let's suppose it has only two lines, ( the four figures are delimited by tab)
123     456
789     999

Second, I type the following command under PSQL,
create table ttt ( c1 bigint, c2 bigint);

Finally, I try to import the data from test.txt into table ttt by,
copy ttt from '/home/temp/test.txt';

But I was told,
ERROR:  copy: line 1, Bad int8 external representation "'123'"

(My PostgreSQL is v7.1)

I would appreciate any help or advice.

        thanks in advance,

    Dong, Meng


pgsql-bugs by date

Next:From: Wolfgang WinklerDate: 2001-08-01 14:21:27
Subject: locale and german umlauts
Previous:From: Stephan SzaboDate: 2001-07-31 22:43:14
Subject: Re: ERROR: parser: parse error at or near "execute"

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