X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AE28D9DD699 for ; Thu, 1 Dec 2005 14:58:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25013-09 for ; Thu, 1 Dec 2005 14:58:50 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id D41AB9DD694 for ; Thu, 1 Dec 2005 14:58:50 -0400 (AST) Received: from athlon.ewsd.donpac.ru (bercut.donpac.ru [80.254.111.197]) by svr2.postgresql.org (Postfix) with ESMTP id A17D8F0B34 for ; Thu, 1 Dec 2005 18:58:50 +0000 (GMT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by athlon.ewsd.donpac.ru (Postfix) with ESMTP id A4F8517705 for ; Thu, 1 Dec 2005 21:59:03 +0300 (MSK) Message-ID: <438F47F7.2040109@stc.donpac.ru> Date: Thu, 01 Dec 2005 21:59:03 +0300 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: PL/Python set returning functions Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/1 X-Sequence-Number: 5869 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