PgBytes quote the value using internal implementation.
But. The bytea escaping make different by connection property. and PostgreSQL 8.3.1 make some modify on escaping bytea escaping method
In release note 8.3.1
"Make encode(bytea, 'escape') convert all high-bit-set byte values into \nnn octal escape sequences (Tom) "
Becase of above thing. current implementation was make some error...
2008-04-10 04:53:29 UTC in Python Interface to PostgreSQL