Search Postgresql Archives

Re: bytea corruption?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux