I'm currently working on a table that contains hashes, stored in bytea format. Converting the hashes to hex-strings however yields the wrong order of bytes. Example:
SELECT encode(hash, 'hex') FROM mytable LIMIT 1; Output: 1a6ee4de86143e81 Expected: 813e1486dee46e1a
Is there a way to reverse the order of bytes for all entries?