PHP has functions bin2hex() and hex2bin(), and I have to deal with
the results in PostgreSQL.
These functions Returns an ASCII string containing the hexadecimal
representation of |str|. The conversion is done byte-wise with the
high-nibble first and Decodes a hexadecimally encoded binary
to_hex() takes in integer or bigint and returns a hexadecimal string
equivalent. But there is also, perhaps better, encode() and decode() which
convert string to either base64, hex, or escape codes.
http://www.postgresql.org/docs/9.3/static/functions-string.html
On Fri, Dec 19, 2014 at 2:38 PM,