From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: \COPY to accept non UTF-8 chars in CHAR columns
Date: Fri, 27 Mar 2020 11:46:34 -0400
Message-ID: <8922.1585323994@sss.pgh.pa.us> (raw)
In-Reply-To: <20200327153623.GA32266@sh4-5.1blu.de>
References: <20200327153623.GA32266@sh4-5.1blu.de>
Matthias Apitz <guru@unixarea.de> writes:
> In short, it there a way to let \COPY accept such broken ISO bytes, just
> complaining about, but not stopping the insert of the row?
No. We don't particularly believe in the utility of invalid data.
If you don't actually care about what encoding your data is in,
you could use SQL_ASCII as the database "encoding" and thereby
disable all UTF8-specific behavior. Otherwise, maybe this conversion
is a good time to clean up the mess?
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, guru@unixarea.de
Subject: Re: \COPY to accept non UTF-8 chars in CHAR columns
In-Reply-To: <8922.1585323994@sss.pgh.pa.us>
References: <20200327153623.GA32266@sh4-5.1blu.de> <8922.1585323994@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