Code: Select all
“a”"b”,”c
d”
We tried things like:
Code: Select all
copy test from ‘/tmp/aoeu.csv’ delimiter ‘,’ enclosed by ‘”‘;
copy test from ‘/tmp/aoeu.csv’ delimiter ‘,’ enclosed by ‘”‘ escape as ‘”‘;
Moderator: NorbertKrupa
Code: Select all
“a”"b”,”c
d”
Code: Select all
copy test from ‘/tmp/aoeu.csv’ delimiter ‘,’ enclosed by ‘”‘;
copy test from ‘/tmp/aoeu.csv’ delimiter ‘,’ enclosed by ‘”‘ escape as ‘”‘;
Question marks? I'm not using question marks. If you're talking about the weird "smart quotes" that this forum is replacing my ordinary double quotes with, then I don't know how to disable that - I already wrapped the thing in code tags.sKwa wrote:Hi yang!
For ESCAPE AS & ENCLOSED BY you can choose any ASCII value in the range E'\001' to E'\177' inclusive (any ASCII character except NULL: E'\000')...
question marks that you use are NON-ASCII and out of range.
Sure, that's literally the sample table I was using in my first post. Here's a sample schema:juniorfoo wrote:Can you upload/send the table definition and a sample and we can help?
Code: Select all
create table test (a varchar(512), b varchar(512));
Code: Select all
“a”"b”,”c
d”
Code: Select all
dbadmin=> copy test from '/usr/home/dbadmin/test.txt' delimiter ',';
Rows Loaded
-------------
1
(1 row)
dbadmin=> select * from test;
a | b
--------+----
a"b | c
(1 row)
Code: Select all
<93>a<94>"b<94>,<94>c
d<94>