Skip to content

Is there a way to turn off encoding checking for a text column during insertion? #1554

Answered by jackc
ns-gzhang asked this question in Q&A
Discussion options

You must be logged in to vote

If I understand correctly your 4th column in the files table is text? If so, it's not a the parameter binding that's the issue, it's that PostgreSQL literally will not store invalid UTF8 in a UTF8 collated text column.

I would also suggest double checking that the bytea literal is doing what you expect. It might actually be storing that text.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ns-gzhang
Comment options

@jackc
Comment options

@ns-gzhang
Comment options

Answer selected by ns-gzhang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants