"Rudolf Leitgeb" <r.leitgeb@x-pin.com> writes:
> PQescapeByteaInternal uses sprintf to convert a byte to its octal
> representation, which slows down escaping of large BLOBs significantly.
Good point. Fixed in HEAD and 8.3 branches.
regards, tom lane