In Python I encoded one string,
>>> base64.b64encode('1111')
'MTExMQ=='
Now when I try to decode it in Postgresql I got Hex values instead of the original string.
=# select decode('MTExMQ==', 'base64');
decode
------------
\x31313131
How can I get the original string without any change in Postgresql?
set bytea_output to 'escape';(default on earlier versions) it will return wanted result