Postgres: SELECTing bytea data partially with offset and length
Of course, just use the substring function:

select substring(bytea_contents from offset for length) FROM table;


or get_byte(bytea_contents,offset) to get a single byte as an integer.

See Binary String Functions and Operators in the doc for all functions.