Reputation: 22146
I have a fairly short (14-byte) bytea
data column in my database. I would like to print it as a hexadecimal string.
How do I do that?
Upvotes: 54
Views: 54081
Reputation: 22146
Based on this answer, I found my solution to be
SELECT encode(my_column::bytea, 'hex') FROM my_table;
Upvotes: 103