Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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.

 PostgreSQL-powered mail user agent and storage:

In response to


pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group