I have a Postgres database bg that uses WIN1252 encoding. To get around UTF8 conversion issues, I want to remove values like 0x9D from my data. How would I remove these values from a column named comments in bg.bg."DEV"?
Based on this question, I've tried:
UPDATE bg.bg."DEV"
SET "comments" = REPLACE(comments, X'9D','')
WHERE "comments" like '%'||x'9D'||'%';
However this throws:
ERROR: "%" is not a valid binary digit
LINE 3: WHERE "comments" like '%'||x'9D'||'%';
^