Use PGConn#escape_bytea instead of PGConn::escape_byte if the data is written in PostgreSQL directly