migration oracle to postgresql invalid byte sequence for encoding “UTF8”: 0x00

天大地大妈咪最大 提交于 2019-12-11 16:58:03

问题


Im migrating an application from oracle to postgresql. In one of the functions that I already migrated I copy data from a different oracle db (db link in oracle, oracle_fdw extension in postgresql) from a few tables into a local table in my postgresql db. However, I`m getting the next error :

invalid byte sequence for encoding "UTF8": 0x00

I saw that some people had this kind of issue in this forum but they didnt try to copy the data directly from a remote database (they loaded data from a dump or from a csv..).

Some kind of idea what can I do ?


回答1:


PostgreSQL does not allow the “zero” character in character strings.

You'll have to sanitize the Oracle data before you can retrieve them from PostgreSQL.



来源:https://stackoverflow.com/questions/45280175/migration-oracle-to-postgresql-invalid-byte-sequence-for-encoding-utf8-0x00

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!