DBD::Pg doesn't seem to prefer it after all:
wiki.cgi: DBD::Pg::db do failed: ERROR: parser: unterminated quoted string
at or near "'BZh91AY&SY!!!z" at character 97
Note that this is with auto-quoting/escaping enabled, btw.
Is that with a BYTEA field or a TEXT field? TEXT fields can't handle character 0 but
BYTEA fields should. In any event what I
personally do is Base64 encode before sticking such data in the DB. It's a little
more space, but it avoids quoting issues.