Thread: pgsql: Revert COPY OUT to follow the pre-8.3 handling of ASCII control

pgsql: Revert COPY OUT to follow the pre-8.3 handling of ASCII control

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Revert COPY OUT to follow the pre-8.3 handling of ASCII control characters,
namely that \r, \n, \t, \b, \f, \v are dumped as those two-character
representations rather than a backslash and the literal control character.
I had made it do the other to save some code, but this was ill-advised,
because dump files in which these characters appear literally are prone to
newline mangling.  Fortunately, doing it the old way should only cost a few
more lines of code, and not slow down the copy loop materially.
Per bug #3795 from Lou Duchez.

Modified Files:
--------------
    pgsql/src/backend/commands:
        copy.c (r1.289 -> r1.290)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/copy.c?r1=1.289&r2=1.290)