| От | Joseph Barillari |
|---|---|
| Тема | plpython and nrows() |
| Дата | |
| Msg-id | m3sn5k9wp3.fsf@washer.barillari.org обсуждение исходный текст |
| Список | pgsql-general |
The archives indicate that someone asked this question back in
November, but there's no record of a reply. Here goes:
I'm writing a function in plpython, and have been unable to get the
nrows() call to work. For instance, running the function:
CREATE OR REPLACE FUNCTION py_test()
RETURNS INTEGER
AS '
result = plpy.execute("""SELECT * FROM events;""")
rows = result.nrows()
return 0
'
LANGUAGE 'plpython';
results in the following:
cal=> select py_test();
ERROR: plpython: Call of function `__plpython_procedure_py_test_67236' failed.
exceptions.SystemError: error return without exception set
I know that the nrows() call is responsible for the error (removing
the call eliminates the error), but am at a loss to determine how to
fix it. The testsuite doesn't seem to test nrows() (or so I grepped),
which led me to believe (perhaps mistakenly) that the implementation
might be broken. Any suggestions as to what to try would be
appreciated.
Regards,
--Joe
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера