From: Gary Chambers <gwchamb@gmail.com>
To: pgsql-php@postgresql.org
Subject: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
Date: Thu, 1 Feb 2007 21:27:23 -0500
Message-ID: <302670f20702011827x28d9a689m388b2c8a703f31af@mail.gmail.com> (raw)
All...
Apache 2.2.3, PostgreSQL 8.2.1, PHP 5.1.6, Linux
I have inserted (via pg_query_params) into a bytea field some binary
data (a JPEG image in this case) which I have escaped using
pg_escape_bytea. It appears, however, that the extracted data is
corrupt (NOT unescaped, more precisely), even after unescaping it with
pg_unescape_bytea. If I perform another (a subsequent)
pg_unescape_bytea, it appears to be partially unescaped, but there
still remain errors because the rest of the image is severely
distorted -- but minimally recognizeable as part of the original
image. What am I missing? I'm using the lo_* functions as an
alternative, but it's hard to dismiss the ease with which it appears
to deal with binary data with a bytea field.
Many thanks in advance!
-- Gary Chambers
// Nothing fancy and nothing Microsoft!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: gwchamb@gmail.com
Subject: Re: pg_[un]escape_bytea, pgsql 8.2.1, php 5.1.6, Linux
In-Reply-To: <302670f20702011827x28d9a689m388b2c8a703f31af@mail.gmail.com>
References: <302670f20702011827x28d9a689m388b2c8a703f31af@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox