newline character handling - Mailing list pgsql-general

From Sampath, Krishna
Subject newline character handling
Date
Msg-id EDD4714513C8D2118B940090273D1A8201183B27@NJ01SNT11
Whole thread Raw
List pgsql-general
It is all postgresql all day, today :-)
sorry if this should have gone to the novice forum.

As I tried, using COPY, to import a few flat files created under Windows
into postgresql running on a Linux machine, I discovered that:
* If the last field in your record is a string, postgresql imports it, but
keeps the ^M as part of the text string.
* If the last field is numeric, postgresql refuses to import that line
(because of the ^M, the field is not recognized as a number)

Once I stripped the ^M, the data bulkloaded without a problem. Perhaps COPY
should be smarter and recognize the DOS-style line endings?

Curiously,
krishna

pgsql-general by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: Changes doc for 7.0 beta 4?
Next
From: Frank Miles
Date:
Subject: granting permission to groups?