From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simone Tellini <tellini(at)areabusiness(dot)it>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: restore whoes |
Date: | 2002-02-11 19:17:54 |
Message-ID: | 200202111917.g1BJHsi03274@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Another option is to just print the sed command that would strip off the
> > \r from the end of the line.
>
> You keep on assuming that a mechanical fix is possible when a file's
> been munged. It is *NOT*. There is no reliable way to tell whether a
> \r was part of the original data or was added by a newline converter.
> We will not do anyone a service by printing a message that falsely
> suggests they don't need to think carefully about how to reconstruct
> their data.
>
> The only thing worse than no error message is a misleading error
> message.
Well, if the COPY fails on the last value of the first row, and that
value has a trailing \r, we can be pretty sure. I don't see how your
solution make it fool-proof, except by requiring every COPY file, old
and new, and created, to have CR as \r. That seems too heavy-handed the
other way.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-11 19:24:18 | Re: restore whoes |
Previous Message | Peter Eisentraut | 2002-02-11 19:16:23 | Re: Permissions on FUNCTIONS |