Re: UTF-8 context of BYTEA datatype??

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Rafal Pietrak" <rafal(at)zorro(dot)isa-geek(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UTF-8 context of BYTEA datatype??
Date: 2006-05-30 18:12:20
Message-ID: 20060530201229.15390
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rafael Martinez 2006-05-30 18:21:32 Re: [GENERAL] 8.1.4 - problem with PITR - .backup.done /
Previous Message SCassidy 2006-05-30 18:08:28 Re: UTF-8 context of BYTEA datatype??