PL/Python set returning functions - Mailing list pgsql-interfaces

From Eugene Prokopiev
Subject PL/Python set returning functions
Date
Msg-id 438F47F7.2040109@stc.donpac.ru
Whole thread Raw
Responses Re: PL/Python set returning functions  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: pl/pyton: exceptions.ImportError: No module named email.Parser
Next
From: "Joshua D. Drake"
Date:
Subject: Re: PL/Python set returning functions