Creates a functions which returns a hexadecimal number given as text as bigint.
SELECT hex2bigint('a1b0') AS hex_as_bigint;
Result: