Is there a way to compare a single byte value to a bytea field in PostgreSQL?
For example: I have a bytea field with the value \x11AA22BB. The comparison to a byte value of AA should be true while the comparison to a byte value of 1A should be false.
The only way I see is to extract each byte from the bytea column separately with something like get_byte(string, offset) and check each one.