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.
regards, tom lane