On Friday, May 14, 2021, Sergio Alonso <seralonso1014(at)gmail(dot)com> wrote:
> ('TEST one\r\n' )
> TEST one\\r\\n
>
This has nothing to do with the copy command. You are mis-informed on how
to write string literals, in particular expecting ‘\r’ to be escaped when
in fact in a simple string literal the only special character is the single
quote.
You need to review 4.1.1.2 (
https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS)
if you need to write string literals that contain backslash escapes.
David J.