+1 for this.
Some minor comments:
1. I thought the new test cases should be located earlier in the file
where there were already a couple of POSITION tests.
(see "-- E021-11 position expression")
2. Maybe one of your test cases can be identical to the example from
the docs [1].
position('\x5678'::bytea in '\x1234567890'::bytea) → 3
======
[1] https://www.postgresql.org/docs/17/functions-binarystring.html
Kind Regards,
Peter Smith.
Fujitsu Australia