I have a table with a byte field, and it would be convenient if I could make queries through the command line (or pgAdmin query executor). I have a hex value as a string. Is there a built-in function to convert hex to bytea?
I would like to do something like:
SELECT * FROM table WHERE my_bytea_field=some_???_function('fa26e312');
where 'fa26e312' is the hexadecimal value of the byte field that I want.
Note: this is just useful when I develop / debug things, I can do this with code, but I would like to be able to do this manually in the request.
source share