Greig Wise <greigwise@xxxxxxxxxxx> writes: > Hello. I have run into an issue when using the copy command on tables > with json columns where Postgres seems to improperly escape backslashes > under certain conditions thus creating invalid JSON. AFAICS this is COPY's normal behavior: it doubles backslashes in the default format. You could use CSV format, perhaps, but that has its own quoting rules that also mean that what comes out is not going to be json-and-nothing-but. See "File Formats" here: https://www.postgresql.org/docs/current/sql-copy.html regards, tom lane