Function returning SETOF using plpythonu

Поиск
Список
Период
Сортировка
От Luís Sousa
Тема Function returning SETOF using plpythonu
Дата
Msg-id 45BA3964.8070704@ualg.pt
обсуждение исходный текст
Список pgsql-sql
Hi,

Is it possible to return rows from a function written in plpythonu using 
SETOF?

Example:
CREATE FUNCTION "test_python_setof"()
RETURNS SETOF text AS '   records=plpy.execute("SELECT name FROM interface");   return records
' LANGUAGE 'plpythonu';

With this code is returning the object from the execution:
<PLyResult object at 0xb703e458>

Best regards,
Luís Sousa




В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using Temporary Tables in postgres functions
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Intersection of two date interval