Re: How to 'register' functions, so they can be called (plpythonu)
В списке pgsql-general по дате отправления:
| От | Richard Huxton |
|---|---|
| Тема | Re: How to 'register' functions, so they can be called (plpythonu) |
| Дата | |
| Msg-id | 46DE6A57.9020307@archonet.com обсуждение исходный текст |
| Ответ на | How to 'register' functions, so they can be called (plpythonu) ("blay bloo" <blaybloo@googlemail.com>) |
| Ответы |
Re: How to 'register' functions, so they can be called (plpythonu)
|
| Список | pgsql-general |
blay bloo wrote:
> I am defining some functions using plpythonu, through the standard means.
>
> Here I have one function (test1) which calls another (testfunc). When
> I excute this I get the following error:
>
> ERROR: plpython: function "test1" failed
> DETAIL: <type 'exceptions.NameError'>: global name 'testfunc' is not defined
You need to call it as an SQL statement "SELECT testfunc(...)"
> However, from the console, select testfunc('test') works fine.
I believe the python embedder mangles the function names when it loads
them into PG, so you can't call them directly.
--
Richard Huxton
Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера