How to XOR md5 hash values and cast them to HEX in postgresql
问题 What I have tried so far SELECT md5(text) will return text (hex strings) . After that We need to xor them SELECT x'hex_string' # x'hex_string'; But the above results in binary values. How do I again convert them into hex string? Is there anyway to xor md5 values in postgresql and convert this into hexadecimal values again ? 回答1: Those binary values are in fact of type bit varying , which differs significantly from bytea . bit varying comes with built-in support for XOR and such, but