Re: [ADMIN] restore whoes

2002-02-18 Thread Chad R. Larson
At 01:42 PM 2/11/2002 , Tom Lane wrote: >It's not ideal, certainly, but I think it's preferable to continuing to >get burned every time a pg_dump file comes within hailing distance of Windoze. Perhaps something along this line would be useful. /* ftpfix.c - ASCII to binary fixup - 1.2 */ /*

Re: [ADMIN] restore whoes

2002-02-13 Thread Mike Castle
In article <[EMAIL PROTECTED]>, Tom Lane <[EMAIL PROTECTED]> wrote: >(2) On Unix machines, "text mode" I/O does not do anything different >from binary mode anyway. Our problem is with pg_dump data that has >temporarily left the Unix world and been munged in transit. We want >to be able to deal

Re: [ADMIN] restore whoes

2002-02-11 Thread Simone Tellini
On Sun, 10 Feb 2002 20:43:16 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: TL> 160 O M U N A L E\r \ \r \n S E D U TL> 170 T A D E L 1 2 M A G G I O TL> TL> The newlines in the file have been translated to \r\n, which messes up oh, btw, the \r\n newlin

Re: [ADMIN] restore whoes

2002-02-11 Thread Simone Tellini
On Sun, 10 Feb 2002 20:43:16 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: TL> I suppose you are working under Windows, or have copied the file into TL> Windows at some point. You need to find a way to avoid corrupting the TL> data file with Windows newline conversion. No, I was working under linu

Re: [ADMIN] restore whoes

2002-02-10 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I was thinking of throwing a specific error when copy fails _and_ when > the line ends with a \r, rather than a generic COPY failure message --- > not sure how to do that, though. Doesn't seem practical, as the actual error may not occur till much later

Re: [ADMIN] restore whoes

2002-02-10 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I think we should throw a very specific error from COPY when it sees \r > > ending a line. Comments? > > Certainly *not*, as that is a valid data pattern. At present. > See my proposal on pghackers for fixing this properly. I was

Re: [ADMIN] restore whoes

2002-02-10 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I think we should throw a very specific error from COPY when it sees \r > ending a line. Comments? Certainly *not*, as that is a valid data pattern. At present. See my proposal on pghackers for fixing this properly. regards, t

Re: [ADMIN] restore whoes

2002-02-10 Thread Bruce Momjian
Tom Lane wrote: > Simone Tellini <[EMAIL PROTECTED]> writes: > > here's a bit of data: the \connect you can see is at line 94382 > > Okay, the problem with this file is fairly obvious after looking at it > with od -c: > > 0d0 \n \r \n \ c o n n e c t - p o > 0e0 s t g

Re: [ADMIN] restore whoes

2002-02-10 Thread Tom Lane
Simone Tellini <[EMAIL PROTECTED]> writes: > here's a bit of data: the \connect you can see is at line 94382 Okay, the problem with this file is fairly obvious after looking at it with od -c: 0d0 \n \r \n \ c o n n e c t - p o 0e0 s t g r e s \r \n C O P Y

Re: [ADMIN] restore whoes

2002-02-10 Thread Tom Lane
Simone Tellini <[EMAIL PROTECTED]> writes: > I was trying to restore a dump from pg 7.1.3 to the newly installed 7.2, > but I got these errors: > You are now connected as new user postgres. > ERROR: copy: line 47, CopyReadAttribute: end of record marker corrupted > psql:backup.sql:94383: ERROR:

[ADMIN] restore whoes

2002-02-09 Thread Simone Tellini
Hi there, I was trying to restore a dump from pg 7.1.3 to the newly installed 7.2, but I got these errors: You are now connected as new user postgres. ERROR: copy: line 47, CopyReadAttribute: end of record marker corrupted psql:backup.sql:94383: ERROR: copy: line 47, CopyReadAttribute: end of