Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lb0QI-00011e-Dt for pgsql-general@arkaria.postgresql.org; Mon, 26 Apr 2021 12:33:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lb0QG-00026R-Rv for pgsql-general@arkaria.postgresql.org; Mon, 26 Apr 2021 12:33:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lb0QG-00026J-KD for pgsql-general@lists.postgresql.org; Mon, 26 Apr 2021 12:33:08 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lb0Q9-0005jf-2Z for pgsql-general@lists.postgresql.org; Mon, 26 Apr 2021 12:33:08 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id A20ED4A0E; Mon, 26 Apr 2021 14:32:59 +0200 (CEST) Date: Mon, 26 Apr 2021 14:32:59 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Invalid byte sequence when importing Oracle BLOB Message-ID: <20210426123259.GB26434@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-04-26 06:49:18 -0500, Ron wrote: > The destination is an (RDS) Postgresql 12.5 with encoding UTF8, and is be= ing > loaded through COPY commands generated by ora2pg. >=20 > The source table has a BLOB column (I think they are scanned images) which > I'm loading into a Postgresql bytea column. >=20 > Seven times out of about 60M rows, I get this error: > Psql:909242: ERROR:=A0 invalid byte sequence for encoding "UTF8": 0xed 0x= af 0xbf Decoding UTF8 doesn't make sense for a bytea column. How does that data look like in the file generated by ora2pg? hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmCGsvsACgkQ8g5IURL+ KF0l4w//XxBvgq7VkQ67Uxs8xCyjFNerU7dLX2zD9NWtKkxk7PgOIO697IbBrk9l 3iITLiOZ3tMfPz4rCnSHcCirbT8AhgPB+DxApQ1kHFbAcYKaws6yxoZBFlfP+4if cHqBqxbYzVVA9kXf9kvq8rkBKkMnQHfyKT2r5U0dM7+7OJ4P7/WhCQlhcS9T6W7y 1LJYVd6RSCeqONvimrrtKWL3Lpso24zFVcSNVP6foC/dzO68m5DQ+/kRkcznfwsE +WorhwIjbdfRj1xtWNWeNWD/EcoHMcmbEYe6c8psnhfG5JB2xk2SsH3ITvqN4ACM L8D8UluuaSoabJ6OcQBYUjL92NI4b06x+nG27rUGvR1QFEb4ui7VnBf3P/pEkezQ SPTsB6zWQv3stiCSWAyFTSuaLy7J4mBQ2GHCoL6xYHlZm5g1oQTw9B7SFyEysDDo a+/9V864BJhMqkbdD8l1h0jwv7gyMMEkK0TiGt8bkyAicWSvNkDWjUag1rJM0Xlb 3sFyyLAAe+zqfqRCgHVAZ/jpyc02SASAS4X9Xlezpc3+4pAmVggz8HQSwVvK6EVe WdGJe1IXCG2oVbIhp/2xVruWrakppjfOVZmhp9wEhyKolr0FKc9z9zpNOxtWrTBH RbHIsXFSWP7yM1my9DWNrl9EK/eRpE2GG/WpcMelmS1dxwEzx6o= =WkGk -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--