Re: \COPY to accept non UTF-8 chars in CHAR columns - Mailing list pgsql-general

From Tom Lane
Subject Re: \COPY to accept non UTF-8 chars in CHAR columns
Date
Msg-id 8922.1585323994@sss.pgh.pa.us
Whole thread Raw
In response to \COPY to accept non UTF-8 chars in CHAR columns  (Matthias Apitz <guru@unixarea.de>)
Responses Re: \COPY to accept non UTF-8 chars in CHAR columns  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Matthias Apitz
Date:
Subject: \COPY to accept non UTF-8 chars in CHAR columns
Next
From: Julien Rouhaud
Date:
Subject: Re: PG12 autovac issues