One of the column of my table contains string with ‘n’.
postgres=# select * from stringtest ;
id | inputstr
----+-----------------
1 | Name : NOCr +
| r +
| Detail : Detail
(1 row)
But when I retrieve same table with COPY TO, new line character is getting escaped
postgres=# COPY (select * from stringtest) TO STDOUT WITH DELIMITER E't' ;
1 Name : NOCrnrnDetail : Detail
How can I make COPY TO command to replace ‘n’ with new line ??
Expected output :
postgres=# COPY (select * from stringtest) TO STDOUT WITH DELIMITER E't' ;
1 Name : NOCr
r
Detail : Detail
How to achieve this ??