Re: PL/Python set returning functions
- From: "Joshua D. Drake" <jd(at)commandprompt(dot)com>
- To: Eugene Prokopiev <prokopiev(at)stc(dot)donpac(dot)ru>
- Cc: pgsql-interfaces(at)postgresql(dot)org
- Subject: Re: PL/Python set returning functions
- Date: Thu, 01 Dec 2005 11:02:38 -0800
- Message-id: <438F48CE.7030008@commandprompt.com> <text/plain>
Eugene Prokopiev wrote:
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
select * from csrf();
What's wrong?
--
Thanks,
Eugene Prokopiev
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PLphp, PLperl - http://www.commandprompt.com/
Home |
Main Index |
Thread Index