http://qs321.pair.com?node_id=522222


in reply to postgresql bytea escaping

How about just using the C API (via DBD::Pg) provided by pg? So:

 $quoted_data = $dbh->quote($data, PG_BYTEA)