when I run this query in Postgres, on a bytea column:
SELECT decode(column_name, 'escape') FROM table_name;
I get this failure:
error function decode(bytea unknown) does not exist
Seems I got it flipped, you can use the decode method on inserts, ex:
insert into table_name values (decode(E'abc123\\000456', 'escape'));
but not use it on selects, should be this instead
SELECT encode(column_name, 'escape') FROM table_name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With