Re: Plperl return_next and bytea binary data?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Philippe Lang <philippe(dot)lang(at)attiksystem(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Plperl return_next and bytea binary data?
Date: 2006-07-24 12:48:55
Message-ID: 20060724124855.GA31711@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 24, 2006 at 11:43:39AM +0200, Philippe Lang wrote:
> The problem seems to come from the return_next, in conjunction with binary data:
>
> ------------------------------------
> return_next
> (
> {
> val => $_[0] * $_[1],
> image => $im->gif()
> }
> );
> ------------------------------------

I don't know exact how pl/perl works, but given that it has no idea
what type the data is, chances are it's passing it through
cstring-to-text conversion. You probably want to force it to return
bytea or some such (without going through cstring-to-bytea conversion
hopefully). I don't see a way to do it in the documentation
though...

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2006-07-24 15:15:13 Re: What about pgtclsh
Previous Message maxime.delaunay 2006-07-24 10:07:59 What about pgtclsh