Nathan Jahnke wrote:
> good catch - it's because i'm used to working in plperlu.
> unfortunately commenting out those lines makes no difference for this
> particular data (that i linked in my original email); it's still
> corrupted:
Don't remove both: remove only the custom decoding.
It's different for the encoding step. It can also be removed, but in this
case you need to tell DBD::Pg that your data is binary, like this:
$insert_sth->bind_param(1, $data, { pg_type => DBD::Pg::PG_BYTEA });
$insert_sth->execute();
(and have $data be raw binary, no custom encoding).
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org