pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eugene Prokopiev <prokopiev@stc.donpac.ru>
To: pgsql-interfaces@postgresql.org
Subject: PL/Python set returning functions
Date: Thu, 01 Dec 2005 21:59:03 +0300
Message-ID: <438F47F7.2040109@stc.donpac.ru> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <438F47F7.2040109@stc.donpac.ru>
Permalink:  ../438F47F7.2040109@stc.donpac.ru/
Also on:    postgresql.org/message-id/438F47F7.2040109@stc.donpac.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: prokopiev@stc.donpac.ru
  Subject: Re: PL/Python set returning functions
  In-Reply-To: <438F47F7.2040109@stc.donpac.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox