oracle - Postgres foreign data wrapper encoding issue -


i'm trying migrate oracle data 'we8mswin1252' encoding database has 'utf8' encoding.

i'm using foreign data wrapper.

i'm getting

invalid byte sequence error

what should do?

such errors can caused 2 things:

  • there may 0 bytes in oracle strings. allowed in oracle (even though problematic), forbidden in postgresql.

  • it easy data corruption in oracle, because pretty sloppy encoding checks , allows insert arbitrary illegal byte sequences when client encoding , server encoding same.

there 2 approaches dealing problem:

  • the correct way: fix data on oracle side. oracle_fdw support telling row in result set caused error.

  • the sloppy way: use postgresql database database encoding sql_ascii, allow store in string (except 0 bytes).


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -