BUG #15983: pg_dump converts CRLF to LF

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: james(dot)inform(at)pharmapp(dot)de
Subject: BUG #15983: pg_dump converts CRLF to LF
Date: 2019-08-29 14:07:36
Message-ID: 15983-04588b1c04500093@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15983
Logged by: James Inform
Email address: james(dot)inform(at)pharmapp(dot)de
PostgreSQL version: 11.5
Operating system: Mac / Linux
Description:

When using "pg_dump --inserts" to generate insert statements in my dump
file, all line feeds (LF and CRLF) in e.g. text fields are converted to
LF.

After importing the dump file using psql, all CRLF are gone and I have LF
everywhere. So in fact pg_dump -> psql for backup/restore changes my data.

This way I am loosing information that is necessary for applications that
expect CRLF and not LF in the data they get from PostgreSQL.

Btw. when not using --inserts in pg_dump then everything works fine and \r\n
is used in the copy command for CRLF.

So, I think we have to opportunities:
1. Fix this behaviour for --inserts option
2. State the behaviour in the manual, so that it is clear for every user.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-08-29 14:33:03 Re: BUG #15983: pg_dump converts CRLF to LF
Previous Message fn ln 2019-08-29 13:55:47 Re: BUG #15977: Inconsistent behavior in chained transactions