From: Tom Lane <tgl@sss.pgh.pa.us>
To: james.inform@pharmapp.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15983: pg_dump converts CRLF to LF
Date: Thu, 29 Aug 2019 10:33:03 -0400
Message-ID: <20554.1567089183@sss.pgh.pa.us> (raw)
In-Reply-To: <15983-04588b1c04500093@postgresql.org>
References: <15983-04588b1c04500093@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> 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.
Can't reproduce that here: the dump is correctly re-imported when
I read it in psql, either with \i or with "-f".
In the --inserts form, the newlines are just going to appear verbatim
in the dump file, so they are very vulnerable to *other* tools deciding
to convert them, and I speculate that that's what happened to your file.
We could protect against that perhaps by dumping such strings using
E'...\r\n...', but that would be entirely unportable to other DBMSes.
Since the only real use-case for --inserts mode (IMO anyway) is to
transfer data to other DBMSes, that doesn't seem like a win.
regards, tom lane
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: tgl@sss.pgh.pa.us, james.inform@pharmapp.de, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15983: pg_dump converts CRLF to LF
In-Reply-To: <20554.1567089183@sss.pgh.pa.us>
* 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