plpython and bytea

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема plpython and bytea
Дата
Msg-id 1132531909.27676.12.camel@fuji.krosing.net
обсуждение исходный текст
Ответы Re: plpython and bytea  (Tino Wildenhain <tino@wildenhain.de>)
Re: plpython and bytea  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
Hi

It seems that plpython is unable to return bytea string when it contains
NUL bytes:

hannu=# CREATE OR REPLACE FUNCTION get_bytea_with_nul() RETURNS bytea AS
'
return ''aa\\0bb''
' LANGUAGE plpythonu SECURITY DEFINER;

hannu=# select get_bytea_with_nul();get_bytea_with_nul
--------------------aa
(1 row)


probably related to plpythons way of generating return value via
converting python objcet to its string representation and then letting
postgres's input func to convert it back.


Btw, does anyone know where Andrew Bosma (the original author of
plpython) is ? 

I would probably have a paid job improving an opensource project for
him :)


-- 
Hannu Krosing <hannu@skype.net>



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Plan chosen for PQexecParams
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Plan chosen for PQexecParams