pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: james.inform@pharmapp.de
Subject: BUG #15983: pg_dump converts CRLF to LF
Date: Thu, 29 Aug 2019 14:07:36 +0000
Message-ID: <15983-04588b1c04500093@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15983
Logged by:          James Inform
Email address:      james.inform@pharmapp.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.



view thread (3+ messages)  latest in thread

Message-ID: <15983-04588b1c04500093@postgresql.org>
Permalink:  ../15983-04588b1c04500093@postgresql.org/
Also on:    postgresql.org/message-id/15983-04588b1c04500093@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, james.inform@pharmapp.de
  Subject: Re: BUG #15983: pg_dump converts CRLF to LF
  In-Reply-To: <15983-04588b1c04500093@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox