From: | Michael Blakeley <mike(at)blakeley(dot)com> |
---|---|
To: | pgsql-general(at)hub(dot)org |
Subject: | Re: newline character handling |
Date: | 2000-04-08 16:56:55 |
Message-ID: | p04310107b51514d9f9b7@blakeley.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> From: "Sampath, Krishna" <KSampath(at)ekmail(dot)com>
> To: pgsql-general(at)postgresql(dot)org
> Subject: newline character handling
> Date: Fri, 7 Apr 2000 15:49:58 -0400
>
> 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?
I'm ok with this for numerics, but against it for text. Why? Because
I work with some binary data, and I wouldn't want the mysterious
problem of not being able to COPY a line containing a record that's
_supposed_ to end in ^M.
-- Mike
From | Date | Subject | |
---|---|---|---|
Next Message | Horst Herb | 2000-04-08 17:25:29 | transaction logging |
Previous Message | Madhavi Daroor | 2000-04-08 16:26:15 | Re: retun cursor |