mert_bakir
05/24/2023, 8:27 PMb'\xab\xb3\x89"\x06\x80C6\x96\xd4&\xa3\x1fA\xc9~'
. How can I convert this to hex representation in postgres? e.g. abb389220680433696d426a31f41c97e
The python equivalent foo.hex()
.mert_bakir
05/24/2023, 8:39 PMceyhun_kerti
05/24/2023, 9:34 PMSELECT encode(E'\xab\xb3\x89"\x06\x80C6\x96\xd4&\xa3\x1fA\xc9~', 'hex');
mert_bakir
05/24/2023, 9:40 PMSELECT encode(E'\xab\xb3\x89"\x06\x80C6\x96\xd4&\xa3\x1fA\xc9~', 'hex');
this returns
ERROR: invalid byte sequence for encoding "UTF8": 0xab
and the strings start with b not E. 😕