I have a bytea column that contains 14 bytes of data. The last 3 bytes of the 14 contain the CRC code of the data. I would like to extract the CRC as a single i
bytea
select get_byte(b, 11) * 65536 + get_byte(b, 12) * 256 + get_byte(b, 13) from (values ('12345678901234'::bytea)) s(b); ?column? ---------- 3289908