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 string".
Basically you can take binary data and each byte becomes two hexadecimal
characters.
Is there anything in PostgreSQL that can do this already? I'm sure I can
work it out but it can't hurt to ask first.
-- Stephen
- [GENERAL] Equivalent of PHP "hex2bin()" Stephen Cook
-