Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Thu, 01 Dec 2005 21:59:03 +0300
  • Message-id: <438F47F7.2040109@stc.donpac.ru> <text/plain>

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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group