| From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Cc: | "Nathan Jahnke" <njahnke(at)gmail(dot)com> |
| Subject: | Re: bytea corruption? |
| Date: | 2009-08-22 14:17:49 |
| Message-ID: | 5e04ee91-21ca-4158-8263-1f48d3e54bd4@mm |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Jahnke | 2009-08-22 18:15:16 | Re: bytea corruption? |
| Previous Message | Thomas Kellerer | 2009-08-22 11:52:07 | Getting listed on "Community Guide to PostgreSQL GUI Tools" |