From: | Mija Lee <mija(at)scharp(dot)org> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | copy commands and linefeeds |
Date: | 2007-09-18 23:49:12 |
Message-ID: | 200709182349.l8INnCka027661@brood2.pc.scharp.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi -
I have two questions that have arisen as a result of using the copy command to
create csv files.
1. Apparently, the table from which I am trying to create the csv file has
linefeeds/carriage returns in it that don't belong there. UGH! Is there a way to
restrict the users from inserting linefeeds into the field? They are connecting
via odbc from some windows app (probably access) so I assume it's a windows
linefeed, and although I can't see them, I know they are there because the
output has them, and I get the following warning:
WARNING: CSV fields with embedded linefeed or carriage return characters might
not be able to be reimported
2. I'm not sure I understand the copy sytax. If I want text to be in single
quotes instead of double quotes, the way I read the doc, the following should
work:
copy table1 to 'output.txt' with csv quote as ''';
which doesn't seem to work. Am I misreading the doc?
Thanks in advance for any help!
Mija
From | Date | Subject | |
---|---|---|---|
Next Message | Sandeep Agarwal | 2007-09-19 05:48:42 | Null records in pg_operator |
Previous Message | A. Kretschmer | 2007-09-18 17:19:04 | Re: [GENERAL] ON INSERT => execute AWK/SH/EXE? |