Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what happen in this error"ERROR: invalid byte sequence for encoding "UTF8": 0x00" #120

Closed
sangli00 opened this issue Aug 17, 2016 · 6 comments

Comments

@sangli00
Copy link

@laurenz maybe oracle table encoding is error.
how to fixed this problem.thanks.

@laurenz
Copy link
Owner

laurenz commented Aug 17, 2016

This is the same problem as #114: while a null byte is allowed in a character string in Oracle, it is not allowed in PostgreSQL. You might want to fix the data on the Oracle side.

@sangli00
Copy link
Author

if I can't permission modify oracle data,so this problem is not fix?
maybe invalid character

@laurenz
Copy link
Owner

laurenz commented Aug 18, 2016

There's no way to allow a zero character in PostgreSQL, and oracle_fdw does not have any provisions for modifying the data it gets from Oracle.

Is the zero byte in the character string in the Oracle database intentional?
If not, maybe they would even be interested in fixing it; zero bytes in strings cause all sort of trouble.

@sangli00
Copy link
Author

ERROR: no primary key column specified for foreign Oracle table

old release is can't PK ?why need PK column?

@laurenz
Copy link
Owner

laurenz commented Aug 18, 2016

For UPDATE or DELETE. See the description of the key option in the README.

@volkmarbuehringer
Copy link

use select translate( column, chr(0),' ' )

in select to convert the invalid byte sequenzes in oracle to something else in oracle
(during selection or update the tables in oracle to remove them )

pg gives you the column names and the invalid codes

before loading into pg I have to do a lot of updates, because the oracledb is infested with this crap,
especially email data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants