Modify COPY TO to emit carriage returns and newlines as backslash escapes
Tom Lane <tgl@sss.pgh.pa.us>
Modify COPY TO to emit carriage returns and newlines as backslash escapes (backslash-r, backslash-n) for protection against newline-conversion munging. In future we will also tweak COPY FROM, but this part of the change should be backwards-compatible. Per pghackers discussion. Also, update COPY reference page to describe the backslash conversions more completely and accurately.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/copy.sgml | modified | +97 −45 |
| src/backend/commands/copy.c | modified | +68 −32 |