Problems with \copy
Problems with \copy
От:
Klaudia Walter <kw243@cam.ac.uk>
Дата:
Dear all,
I am having problems loading files with \copy. It seems that there are
problems with the newline character. I am working on Mac OS X 10.1.2.
and I am trying to load a file into postgresql that has been saved as a
tab delimited text file using excel. I tried already reading the file
via a Java program and writing it into a new file in order to be able to
write \n, \r and System.getProperty("line.separator") at the end of each
line. However, the error message is still
CopyReadNewline: extra fields ignored
Any suggestions?
Many thanks,
Klaudia
------------------------------------------
Klaudia Walter
Department of Pathology
University of Cambridge
Tennis Court Road
Cambridge CB2 1QP
Tel: 01223 333 338
email: kw243@cam.ac.uk
------------------------------------------
Re: Problems with \copy
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Klaudia Walter writes: > I am having problems loading files with \copy. It seems that there are > problems with the newline character. COPY insists on lines being ended by \n, not \r (Mac convention) nor yet \r\n (Windows conventions). Not sure which of these you've got, but evidently it's not the right one ... There are plans afoot to make COPY more forgiving, but since there are backwards-compatibility issues it will take a few versions before we can complete the changeover. regards, tom lane