I have a pg_dump of a table that contains a column of type bytea. It is a long string like: \\x4e696365206d7573696361...
Normally in SQL I would use a simple:
SELECT user_id,
encode(text_column::bytea, 'escape')
FROM posts
LIMIT 10
And that provides the original text.
How can I convert this in Python? I've been trying .encode
/.decode
/base64encode
etc but no luck.