Rafal Pietrak wrote:
> On Mon, 2006-05-29 at 14:01 +0200, Martijn van Oosterhout wrote:
> > >
> > > How come the bytearea is *interpreted* as having encoding?
> >
> > Actually, it's not the bytea type that is being interpreted, it's the
> > string you're sending to the server that is. Before you send bytea data
> > in a query string, you have to bytea encode it first. The DBD::Pg
> > manpage seems to suggest something like:
> >
> > $rv = $sth->bind_param($param_num, $bind_value,
> > { pg_type => DBD::Pg::PG_BYTEA });
> >
> Hmmm, despite initial euphoria, this doesn't actually work.
Just an idea: make sure DBD::Pg::PG_BYTEA is defined.
If not, you're just lacking a "use DBD::Pg;" and the result
you describe is to be expected.
Otherwise, you could use the DBI_TRACE environment variable to learn
what the db driver is issuing to the database at the libpq level.
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org