David Wheeler <david(at)wheeler(dot)net> writes:
> If that's true, then any solution escaping non-printable characters is
> overkill, and therefore only the three characters need to be escaped.
Check ...
> Could be changed to:
> s/\0/\\000/g if $data_type == DBI::SQL_BINARY ||
> $data_type == DBI::SQL_VARBINARY ||
> $data_type == DBI::SQL_LONGVARBINARY;
Offhand I don't think you even need the check on the datatype; wouldn't
it be faster and safer to do the substitution unconditionally? I can't
see that there are any cases that work without this substitution and
fail with it.
regards, tom lane