Re: Invalid byte sequence when importing Oracle BLOB

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Invalid byte sequence when importing Oracle BLOB
Date: 2021-04-26 13:14:40
Message-ID: YIa8wOl4gPtoupcP@c720-r368166.fritz.box
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

El día lunes, abril 26, 2021 a las 06:49:18a. m. -0500, Ron escribió:

> Hi,
>
> The source is an Oracle 12 db with this encoding:
> NLS_LANG = AMERICAN_AMERICA.AL32UTF8
> NLS_NCHAR = AL32UTF8
>
> The destination is an (RDS) Postgresql 12.5 with encoding UTF8, and is being
> loaded through COPY commands generated by ora2pg.
>
> The source table has a BLOB column (I think they are scanned images) which
> I'm loading into a Postgresql bytea column.
>
> Seven times out of about 60M rows, I get this error:
> Psql:909242: ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0xaf 0xbf

This error can't be caused by a BLOB or bytea column. Only char or vchar
columns can cause (and did cause) such errors in our Oracle/Sybase to
PostgreSQL migrations.

matthias
--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Malik Rumi 2021-04-26 13:17:01 Re: impact of version upgrade on fts
Previous Message Peter J. Holzer 2021-04-26 12:58:34 Re: Invalid byte sequence when importing Oracle BLOB