PL/Python set returning functions

From: Eugene Prokopiev <prokopiev(at)stc(dot)donpac(dot)ru>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PL/Python set returning functions
Date: 2005-12-01 18:59:03
Message-ID: 438F47F7.2040109@stc.donpac.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Joshua D. Drake 2005-12-01 19:02:38 Re: PL/Python set returning functions
Previous Message Chris Moore 2005-12-01 18:40:48 Re: Data showing up as #Deleted in Access