Use bytea hex format when possible

Define whether backend recognizes bytea hex format (>= 9.0)
Encode bytea data in hex format when possible.