PL/Python set returning functions

Поиск
Список
Период
Сортировка
От Eugene Prokopiev
Тема PL/Python set returning functions
Дата
Msg-id 438F47F7.2040109@stc.donpac.ru
обсуждение исходный текст
Ответы Re: PL/Python set returning functions  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-interfaces
Hi,

How can I return some rows from my PL/Python function?

I wrote:

dbmail=# create type composite as (id bigint, name text);
CREATE TYPE
dbmail=# create or replace function csrf() returns setof composite as $$
dbmail$# return ((1, "james"), (2, "bob"), (3, "fargus"))
dbmail$# $$ language plpythonu;
CREATE FUNCTION
dbmail=# select csrf();
ERROR:  plpython functions cannot return tuples yet

What's wrong?

--
Thanks,
Eugene Prokopiev


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: pl/pyton: exceptions.ImportError: No module named email.Parser
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: PL/Python set returning functions