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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 30 May 2006 20:12:20 +0200
  • Message-id: <20060530201229.15390>

	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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group