当我尝试导出字段的文本内容,并且该内容具有回车符时,该字符的输出类似于 \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';
Run Code Online (Sandbox Code Playgroud)
我想返回以下(a):
first line
second line
...
and other lines
Run Code Online (Sandbox Code Playgroud)
但是,输出是 (b):
first line\Nsecond line\N...\Nand other lines
Run Code Online (Sandbox Code Playgroud)
有人知道如何获得(a)输出吗?
postgresql ×1