newline character handling

From: "Sampath, Krishna" <KSampath(at)ekmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: newline character handling
Date: 2000-04-07 19:49:58
Message-ID: EDD4714513C8D2118B940090273D1A8201183B27@NJ01SNT11
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Frank Miles 2000-04-07 20:15:54 granting permission to groups?
Previous Message The Hermit Hacker 2000-04-07 19:26:00 Re: Changes doc for 7.0 beta 4?