Re: Plperl return_next and bytea binary data?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Plperl return_next and bytea binary data?
Дата
Msg-id 20060724124855.GA31711@svana.org
обсуждение исходный текст
Ответ на Plperl return_next and bytea binary data?  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
Список 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "Philippe Lang"
Дата:
Сообщение: Plperl return_next and bytea binary data?
Следующее
От: maxime.delaunay@gmail.com
Дата:
Сообщение: What about pgtclsh