Casey's having trouble posting to the list today and asked me to forward the message on to the group.

In reply to what to do next, perhaps try redirecting the output to a file instead of to the screen?? It might at least indicate whether the funny error is caused by a funny newline character, and you could also see what the whole error message was.

-------- Original Message --------
Subject: Re: [uug] postgres copy file to table
Date: Tue, 30 Sep 2003 20:22:18 -0600
From: Casey T. Deccio

Lars...the list kept bouncing this email for some reason...it
told me that the content type was not explicitly allowed(?)
Anyway, maybe you wouldn't mind posting it for me also?  Thanks,

Casey

-----------------------------------------------

On Tue, 2003-09-30 at 14:39, Lars E. Olson wrote:
(Did anyone ever reply to this?)

Thanks, Lars. You're the first.


It may not be a buffer overflow, it may be issues with end-of-line characters. I know that a lot of programs (Windows and Unix both) kind of expect one type of EOL and
behave really funny when they get a different type.

This is what the Postgres documentation says: "Note that the end of each row is marked by a Unix-style newline ("\n"). Presently, COPY FROM will not behave as desired if given a file containing DOS- or Mac-style newlines. This is expected to change in future releases."

Unfortunately, I think I'm using \n.  the test file I created (in my
original email) was just a file I created in vi on my linux box.  That
makes me wonder where to go next.

The symptom in Unix programs is that it prints out the rest of the line starting with the first column on the same line (i.e. carriage-return without advancing the line-feed) which looks something like your error message.

Yeah, the error message is definitely weird, but I'm not sure how to fix it. If anyone could plug in the data from my last post and get it to work (it's only two lines!), I'd be glad to get it. I've got to present this project to the people who are paying me to do it on Thursday, and I can't even import the data!

Some annoying artifact of the old line-printer-based workstations in days of yore.

/me continues trying to catch up on backed-up e-mails

What a dedicated, remote club member...all the way from Illinois!





____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to