Re: PL/Python set returning functions
От | Joshua D. Drake |
---|---|
Тема | Re: PL/Python set returning functions |
Дата | |
Msg-id | 438F48CE.7030008@commandprompt.com обсуждение исходный текст |
Ответ на | PL/Python set returning functions (Eugene Prokopiev <prokopiev@stc.donpac.ru>) |
Ответы |
Re: PL/Python set returning functions
|
Список | pgsql-interfaces |
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/
В списке pgsql-interfaces по дате отправления: