【发布时间】:2012-12-18 01:32:45
【问题描述】:
当我尝试导出字段的文本内容,并且该内容包含回车字符时,该字符会像 \N 字符串一样输出。
例如:
create table foo ( txt text );
insert into foo ( txt ) values ( 'first line
second line
...
and other lines');
copy foo ( txt ) to '/tmp/foo.txt';
我想返回以下(a):
first line
second line
...
and other lines
但是,输出是(b):
first line\Nsecond line\N...\Nand other lines
有人知道如何获得 (a) 输出吗?
【问题讨论】:
-
你四处搜寻时发现了什么?
标签: sql postgresql copy text-files