Re: using the "copy from" command - Mailing list pgsql-general

From Knepper, Michelle
Subject Re: using the "copy from" command
Date
Msg-id 57E2A340D65EB240B071FEED12F4777B0794DC@merlin.intellidot.net
Whole thread Raw
In response to using the "copy from" command  ("Knepper, Michelle" <mknepper@intellidot.net>)
List pgsql-general
Thanks Joe!
I converted the text file to Unix, using EditPadPro, to get
rid of all the Windows characters.  Got rid of any \r and end-of-line
stuff.
And the copy command worked beautifully.  It entered all of the data
into the table.

Simple thing to do, but new to me.

Ciao. ;-)



-----Original Message-----
From: Joe Conway [mailto:mail@joeconway.com]
Sent: Monday, March 01, 2004 2:28 PM
To: Knepper, Michelle
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] using the "copy from" command


Joe Conway wrote:
> Knepper, Michelle wrote:
>> medispan=# copy mmw_ade_com from
>> '/home/mknepper/medispan/datafiles/mmwadecom.txt' with delimiter '|';
>> ": can't parse "ne 1, pg_atoi: error in "14608
>
> Looks like bad data in line 14608. What does that line of your input
> file look like?

Strike that -- it actually is a problem in line 1, isn't it (you cut off

the line number in the error message above)? It might be end-of-line
character problem. Was your input file created or edited on Windows by
chance (i.e. ends in \r\n instead of \n)?

Joe


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Max/min of 2 values function, plpgsql efficency?
Next
From: Bruce Momjian
Date:
Subject: Re: Moving from MySQL to PGSQL....some questions